Per-page cache settings
dkarlton - November 22, 2008 - 23:36
Any easy way to disable caching for a single page? We have "Normal" caching enabled, and this is working fine in general on our entire site. But we have a single page that handles some custom cookies we've built, and we need to present dynamic HTML based on PHP in the page that reads the $_COOKIE["cookiename"] variable. Ideally, we want to disable caching on this page, to avoid the 304's, so that we are sure the dynamic HTML can be created on each visit, and not pulled from the client's cache.
Any ideas? Thanks!

http://drupal.org/project/cac
http://drupal.org/project/cacheexclude.
gpk
----
www.alexoria.co.uk
Re: Per-page cache settings
You rock. Thanks.
:D
gpk
----
www.alexoria.co.uk
Actually, not sure it's
Actually, not sure it's working right. Is it supposed to be able to disable caching for both anonymous and logged in users (which is what we need)?
There is no page cacheing in
There is no page cacheing in Drupal for logged in users anyway. After enabling the module you need to clear the caches (admin -> settings -> performance) to prevent already-cached pages from being served to anon useres.
gpk
----
www.alexoria.co.uk
Hmm, something is still
Hmm, something is still wrong then. I'm testing with anonymous users, and the client (IE) is still showing a cached version of the page. Anything specific about the syntax of the exceptions? The page we're testing is eg. www.mysite.com/somepage, and I've entered
somepage
in the cache exceptions UI. Should the full path be there instead or something?
EDIT: We have drupal 6.3 and PHP 4.4.8, if this is relevant.
>Should the full path be
>Should the full path be there instead or something?
i.e. you can't use path aliases, for a specific page use node/nn.
[update: there is an issue open to add support for URL aliases: #267784: Ability to specify URL alias as well].
gpk
----
www.alexoria.co.uk
Once again, you rock. All
Once again, you rock. All working now (used the proper node instead of the alias).
:D :D
gpk
----
www.alexoria.co.uk