Ticket #840 (closed enhancement: fixed)
On/off switch for ETags cache
Reported by: | dread | Owned by: | dread |
---|---|---|---|
Priority: | major | Milestone: | ckan-v1.4-sprint-6 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckan | |
Theme: | none |
Description
- Use config variable to switch ETags caching on or off. Consider joining in with 'cache_enabled'.
- Default setting for (all) caching should be off.
- Needs documenting in configuration.rst
Change History
Note: See
TracTickets for help on using
tickets.
dread:
] That's the proxy_cache decorator which sets a Beaker expiry time only. ] Whether that is on or off, you still end up run the ] "etag_cache(cache_key)" command in the package controller won't you? ] And won't that will either insert the Etags header or abort 304 for a ] repeat? I must admit I've not tried it, asking purely with the code in ] front of me and welcome you pointing out where I've gone wrong.
ww:
Right. So those etag calls predate the cache decorators and should probably be either moved up into the decorator (e.g. use @ckan_cache instead of @proxy_cache) or wrapped in a check for the config parameter. (And @ckan_cache could be changed to use pylons' etag_cache function rather than just setting the header...)