← Back to team overview

dhis2-devs team mailing list archive

Re: OrgUnit Caching with Etag.

 

Hi Sandesh

Would a simpler solution be to just enable springs Shallow ETag filter for
the web-api? I thought it was already in use, but it seems to have been
removed.. we are using it in the ohie-module.

--
Morten

On Fri, Oct 10, 2014 at 5:32 PM, Sandesh Sukumar Doolipeta <
sandeshd@xxxxxxxxxxxxxxxx> wrote:

> Hello,
>
>    We were using 'organisationUnits' api of DHIS to get all organisation
> units, which was very time consuming . To solve this problem , the approach
> that we came up is , to add the 'Etag' header to the response headers
> returned by the api , so that , the data is downloaded only if the
> Organisation unit structure has changed.
>
>    We took a look into the code , and saw that there is a generic way of
> implementing this by making changes in the ' AbstractCrudController ' . We
> have added a method called 'getEntityListWithEtag ' , which is called upon
> passing the 'name:like:addEtag' filter. Any implementation of
> 'AbstractCrudController ' can make use of this , by just passing the
> filter.
>
>
>    We committed the changes to tw-msf branch of DHIS (Revision no: 14720)
> . PFA the patch for the same.
>
>    Can you please review the changes and merge it to trunk.
>
> Regards ,
> Sandesh and Mansi.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References