[ckan-dev] Caching - package pages (development copy)
David Read
david.read at okfn.org
Thu Dec 2 18:32:45 UTC 2010
On 2 December 2010 17:11, William Waites <ww at eris.okfn.org> wrote:
> * [2010-12-02 16:57:59 +0000] David Read <david.read at okfn.org> écrit:
>
> ] But the ETags caching is still a sore thumb - you still can't turn off
> ] ETags caching with cache_enabled = False.
>
> def wrapper(func, *args, **kwargs):
> pylons = get_pylons(args)
> enabled = pylons.config.get("cache_enabled", "True")
> if not asbool(enabled):
> log.debug("Caching disabled, skipping cache lookup")
> return func(*args, **kwargs)
> ...
>
> This is not setting an ETag or doing anything at all if cache_enable
> is false... If you are seeing something different happening please
> look a little deeper.
Will,
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.
Dave
>
> -w
>
> --
> William Waites
> http://eris.okfn.org/ww/foaf#i
> 9C7E F636 52F6 1004 E40A E565 98E3 BBF3 8320 7664
>
More information about the ckan-dev
mailing list