Excluding content from CacheFu

2 messages Options
Embed this post
Permalink
binderup-2 () Excluding content from CacheFu
Reply Threaded More More options
Print post
Permalink
I’m working on a site where there are a few custom frontpages each
with sections that are meant to change by each reload, but when I use
CacheFu the dynamic items are cached for the amount of time set in the
CacheFu settings (I have lowered it to 5 minutes).

How can I exclude either parts of a page from being cached or an
entire page from being cached?
(The dynamic areas are created in contentwellportlets with TAL
portlets)

------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Ricardo Newbery-2 () Re: Excluding content from CacheFu
Reply Threaded More More options
Print post
Permalink

On Jul 2, 2009, at 4:40 AM, binderup wrote:

> I’m working on a site where there are a few custom frontpages each
> with sections that are meant to change by each reload, but when I use
> CacheFu the dynamic items are cached for the amount of time set in the
> CacheFu settings (I have lowered it to 5 minutes).
>
> How can I exclude either parts of a page from being cached or an
> entire page from being cached?
> (The dynamic areas are created in contentwellportlets with TAL
> portlets)


CacheFu does not cache "parts" of a page.  If it's just parts that are  
being cached, you probably should look elsewhere for the culprit.  I  
believe contentwellportlets are viewlets so it's probably not a  
RAMCache unless you're doing some sort of encapsulation using a  
RAMCacheable container.  I don't believe that contentwellportlets  
contains any internal caching code.

Assuming we are truly talking about caching the *whole* page and not  
just pieces of the page, then CacheFu could indeed be the culprit.  
Look at the response headers (use the Firefox LiveHTTPHeaders  
extension) to find out what CacheFu rules and headers are being  
applied.  Once you know how the caching is being done, you often have  
several options.  Fix the matching rule so it no longer matches your  
item.  Or make a copy of the matching rule (or create a new rule from  
scratch), customize it to match only the item you want to exclude and  
apply a less aggressive header set to it.

FYI, one trick to get some caching speed even from pages with some  
dynamic elements is to encapsulate the dynamic bits inside a separate  
javascript call from the page.  Then you can aggressively cache the  
page html while the javascript-generated portions are non-cached.

Ric






------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users