[opencms-dev] Problems with caching dynamic pages

Andras Balogh java at reea.net
Fri Mar 21 09:00:39 CET 2003


----- Original Message -----
From: "Olli Aro" <olli_aro at yahoo.co.uk>
To: <opencms-dev at www.opencms.org>
Sent: Thursday, March 20, 2003 17:08
Subject: RE: [opencms-dev] Problems with caching dynamic pages


> Have you tried using cache directives. Something like;
>
> public CmsCacheDirectives getCacheDirectives(CmsObject cms,String
> templateFile,String elementName,Hashtable parameters, String
> templateSelector)
> {
> CmsCacheDirectives cd = new CmsCacheDirectives(false);
>
> return cd;
> }
>

    Hi,

A I see things, returning false as cache directives the page won't be cached
at all so it is the same as cache disabled.
Instead if you want to cache the page based on a parameter you should do
this:

CmsCacheDirectives cd=new CmsCacheDirectives(true);
Vector v=new Vector();
v.add("id");
cd.setCacheParameters(v);
return cd;

Can an opencms guru confirm that i am right?

BW,

Andras.




More information about the opencms-dev mailing list