OpenUpSA/wazimap-ng

The cache should be invalidated whenever a location is changed/deleted. Currently a hard refresh is needed.

Closed this issue · 1 comments

Urls that are being cached for a user but does not have cache keyword on urls.

  • api/v1/datasets/
  • api/v1/datasets/int:pk/
  • api/v1/universe/
  • api/v1/profiles/

It is due to middleware UpdateCacheMiddleware and FetchFromCacheMiddleware
Either we have to clear cache on data save or add @never_cache to views
Urls that are not caching results even if cache keyword is added to url

  • api/v1/datasets/int:dataset_id/indicators/
  • api/v1/indicators/
  • api/v1/indicators/int:pk/
  • api/v1/geography/hierarchies/
  • api/v1/geography/hierarchies/int:pk/
  • api/v1/profiles/int:profile_id/categories/
  • api/v1/profiles/int:profile_id/categories/int:category_id/
  • Extednded Profile serializer (api/v1/profiles/1/geographies/GT/):
    • Editing logo change does not invalidate cache

For updating cache for deleted data we will have to add signal of post_delete for all post save methods