← Back to team overview

dhis2-devs team mailing list archive

OrgUnit Caching with Etag.

 

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.

Attachment: Orgunitcaching.patch
Description: Binary data


Follow ups