[ckan-dev] Caching - package pages (development copy)

David Read david.read at okfn.org
Thu Dec 2 16:57:59 UTC 2010


Caching setup has grown rather organically over the summer and was in
danger of remaining somewhat inconsistent and poorly documented.
James, Rufus and myself all had little sprints recently to improve
different aspects.

> enable_caching should be deprecated and merged with cache_enabled
Will, I notice you said this on 30th Sept as well! Anyway, I took the
initiative to do this last week and added some info to the
documentation as best I could tell how it works:
http://knowledgeforge.net/ckan/doc/ckan/configuration.html#cache-enabled

But the ETags caching is still a sore thumb - you still can't turn off
ETags caching with cache_enabled = False.

It sounds like Friedrich is seeing a bug and should ticket it.
Changing a package should change the hash and therefore ETags won't
cache the next GET.

Richard is playing with page templates, so requires ETags not to be
caching. I suggest you comment out the ETags line in the specific
controller (but don't check this change in).

I've created a ticket for making it easier to turn on/off ETags cache,
perhaps for Friedrich to take a look at? http://ckan.org/ticket/840

David

On 2 December 2010 16:23, William Waites <ww at eris.okfn.org> wrote:
> * [2010-12-02 17:07:57 +0100] Friedrich Lindenberg <friedrich at pudo.org> écrit:
> ]
> ] > changes you make should be sufficient to trigger an update to the
> ] > last_modified value which should cause the internal (beaker) cache to
> ] > be refreshed.
> ]
> ] But it doesn't in practice. I'm travelling right now and don't have
> ] the time to investigate this fully, but the fact is that editing a
> ] package does not lead to any discernible feedback both in Chrome and
> ] Safari for me unless I cache-nuke refresh the page. Claiming the
> ] User-Agent is wrongly implemented doesn't help, btw, they all are.
>
> So when you have time to investigate it more fully take a closer
> look.
>
> So when you say "cache-nuke" refresh, you mean open-apple-shift-R?
> Well that just tells the browser to send a "Pragma: no-cache" which
> means either otherwise the browser was caching or the squid was - in
> particular it means the ckan.lib.cache wasn't.
>
> To find out what is happening, look at the HTTP headers, they will
> tell you.
>
> There may be a bug somewhere, but it will take some actual debugging
> to find it, not speculation.
>
> Cheers,
> -w
>
> --
> William Waites
> http://eris.okfn.org/ww/foaf#i
> 9C7E F636 52F6 1004 E40A  E565 98E3 BBF3 8320 7664
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>




More information about the ckan-dev mailing list