[support] excluding pages from cache for anonymous users D5, D6, D7?

Larry Garfield larry at garfieldtech.com
Sat May 9 07:08:26 UTC 2009


On Friday 08 May 2009 2:27:32 am Ivan Sergio Borgonovo wrote:
> On Fri, 8 May 2009 01:08:53 -0500
>
> Larry Garfield <larry at garfieldtech.com> wrote:
> > http://drupal.org/project/cacheexclude
> >
> > :-)
> >
> > On Friday 08 May 2009 12:52:30 am Ivan Sergio Borgonovo wrote:
> > > I need to exclude pages from cache even for anonymous users.
> > > I found cacheexclude module.
>
>             ^^^^^^^^^^^^
>
> It is Friday for everyone... ;)
>
> I was wondering why it is doing it that way so I could replicate the
> functionality in my code without missing any details.
>
> thanks

... Sigh.

That variable is what controls the "cache this page" logic that happens at the 
END of the page request.  So if a page is already cached, it will still get 
sent.  (That happens before any hooks run.)  However, if the page is not 
cached and that variable is set to false then at the end of the page request 
it will not be cached, and therefore the next page request will regenerate it 
again.  It's useful mostly for pages that contain dynamic "Randomize on every 
page view" content.

I don't know what "menu item base" means, but yes you can set that variable to 
false pretty much anywhere and it should behave as described above.  
CacheExclude is just a simple UI to forcing that value off.

-- 
Larry Garfield
larry at garfieldtech.com


More information about the support mailing list