OpenUpSA / wazimap-ng

Backend for Wazimap-NG. See also https://github.com/OpenUpSA/wazimap-ng-ui/
https://geo.vulekamali.gov.za/
Apache License 2.0
11 stars 16 forks source link

Feature/cache profile points download #458

Closed paulmwatson closed 11 months ago

paulmwatson commented 11 months ago

Description

Caching for the download points URLs.

How to test it locally

Set DEBUG_CACHE_AS_PRODUCTION to True and then curl -I "http://localhost:8000/api/v1/profile/1/points/geography/ZA/points/?format=json" and you should see the header:

Cache-Control: max-age=3600

The first time you do it it is slow as there is no cache. Then the next time, within one hour, will be near instant.