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!

Re: Per-page cache settings

dkarlton - November 23, 2008 - 13:05

You rock. Thanks.

:D

gpk - November 23, 2008 - 13:56

Actually, not sure it's

dkarlton - November 23, 2008 - 21:17

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

gpk - November 23, 2008 - 21:30

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

dkarlton - November 24, 2008 - 10:37

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

gpk - November 24, 2008 - 17:23

>Should the full path be there instead or something?

Enter one page per line as Drupal paths.

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

dkarlton - November 24, 2008 - 19:15

Once again, you rock. All working now (used the proper node instead of the alias).

:D :D

gpk - November 24, 2008 - 23:35
 
 

Drupal is a registered trademark of Dries Buytaert.