[opencms-dev] Clear Flex Cache

Alexander Kandzior alex at opencms.org
Thu Jan 22 17:02:00 CET 2004


Only a member of the "Administrator" group is allowed to generate the Flex
Cache clear event. If the event is generated by other users it's simply
ignored. 
 
Are you sure you need to clear the cache? I would think that changing the
cache key property value is the way to solve your problem.
 



Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com/>  

 
 

-----Original Message-----
From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of Emiliano Viera
Sent: Thursday, January 22, 2004 3:28 PM
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Clear Flex Cache


I've tried 2 way to clear it. It doesn't give me any error, but doesn't
work. I'm checking it all the time with the administrator page in the
backoffice, and no matter how many times i use my clear page, the cache
count never turns to zero (unless i use the buttons in the adm page)
 
Here are my two tries: 
 
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
CmsObject cmsObject = cms.getCmsObject();
 
//Try #1
A_OpenCms.fireCmsEvent(new CmsEvent(cmsObject,
I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR,
Collections.singletonMap("action", new Integer(CmsFlexCache.C_CLEAR_ALL))));
 
//Try #2
CmsFlexController controller =
(CmsFlexController)request.getAttribute(CmsFlexController.ATTRIBUTE_NAME);
CmsFlexCache cache = controller.getCmsCache();
cache.cmsEvent(new CmsEvent(cmsObject,
I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR,
Collections.singletonMap("action", new Integer(CmsFlexCache.C_CLEAR_ALL))));
 
Do I need to put something else ??
 
Thanks!
Emiliano
 

----- Original Message ----- 
From: Emiliano  <mailto:eviera at sdd.com.ar> Viera 
To: opencms-dev <mailto:opencms-dev at opencms.org>  
Sent: Thursday, January 22, 2004 10:17 AM
Subject: [opencms-dev] Clear Flex Cache

I need to clear the flex cache in a .jsp page. Does anybody have an snippet
to do it ?
 
I dont want to deactivate the cache, because it improves the performace.
But, in some places of my site, i need to clear it.
 
Thanks
Emiliano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040122/7592f57f/attachment.htm>


More information about the opencms-dev mailing list