Replies: 2 comments 1 reply
-
Ciao @amercader so after some attempt I'm able to reply on this even if I'm not convinced this is the perfect solution. 1.st I'm using nginx to proxy calls to ckan So I decided to use your suggestion to have cache on server side (nginx) and improve cache headers for blueprint over 2.8.x This is what I've:
You may note that most of these proxy directives may stay at server {} level and not at server { location {}} Well I'm doing that since I'm behind a IAP proxy and my authentications and sessions renewals are provided by redirection. Having that at server level was causing an infinite loop during redirection and to avoid that I may have implemented some exceptions for /user/login and logout or better control 302 responses at global level. I'm not interested in that (especially on production) so I'm using the above to limit cache usage to my custom endpoints /{CKAN}/terriajs/... |
Beta Was this translation helpful? Give feedback.
-
We at https://www.opendata.fi/en use cloudfront CDN in front of the service itself. We have configured cache headers of ckan to announce all anonymous requests to be public so that any page will be cached in cloudfront for awhile after the request. The caching time is not long to accommodate updates to datasets, as invalidating cloudfront cache is not simple thing to do. Any signed in user have private cache headers in use so none those pages will be cached in cloudfront. We no longer cache on the nginx level at all, as most of the requests never arrive on virtual machine itself. As we run ckan 2.8 still for awhile, we have patched flask cache control headers ourselves to our instances as it never was backported to 2.8. |
Beta Was this translation helpful? Give feedback.
-
Do you use a caching proxy like Squid, Nginx etc? A CDN? An external service?
What do you cache and what you don't? (eg logged in users? searches? dataset pages?)
What policies do you use? eg expiration times, triggers...
Would love to hear any experiences on this front
Beta Was this translation helpful? Give feedback.
All reactions