AW: [opencms-dev] Dynamic Pages (template cache)

Hoffmann, Christian Christian.Hoffmann at sdm.de
Mon Jan 20 09:39:29 CET 2003


Hi Ivan,

maybe you should use getCacheDirectives()? It is described in Section 2.3.9
(pages 63-69) in the Manual.

Christian

> -----Ursprüngliche Nachricht-----
> Von: Ivan Biddles [mailto:ivanb at scientology.net] 
> Gesendet: Montag, 20. Januar 2003 09:17
> An: opencms-dev at www.opencms.org
> Betreff: [opencms-dev] Dynamic Pages (template cache)
> 
> 
> Hi,
> 
> I have been struggling with an issue that my dynamic pages 
> are generated once, when online, but then the JSPs are never 
> run again and the same version is always displayed.
> 
> I have specified these pages as "export=dynamic", and 
> everything works perfectly in the off-line project.
> 
> I tracked it down to the "template cache". I had already 
> tried disabling both the element and flex caches without success.
> 
> (The template cache is only mentioned twice in the Manual, 
> both times in the Javadoc section - pages 200 and 215.)
> 
> What I found was that my JSP would run once and then its 
> _output_ would be stored in the template cache. From then on 
> OpenCms simply serves up the page as it was originally created.
> 
> This means that Person A logs in and goes to some page and 
> gets a display of some personal information, let's say. Then 
> Person B does the same thing but he sees Person A's 
> information, because OpenCms is only se5rving up one version 
> of this page.
> 
> In CmsTemplate Cache, I found the following code:
> 
>       // TODO: get the cache-size from properties
>       private CmsCache templateCache = new CmsCache(1000);
> 
> So there is no way to turn off this cache from the property file.
> 
> There must be some way of controlling this behaviour.
> 
> I'm sure others must tried to create dynamic pages, so it 
> must be some setting that I have got wrong somewhere, but I 
> haven't been able to find what it is.
> 
> So any help is urgently needed and would be greatly appreciated.
> 
> Thanks,
>            Ivan
> 



More information about the opencms-dev mailing list