[opencms-dev] Clear Flex Cache
Emiliano Viera
eviera at sdd.com.ar
Thu Jan 22 15:30:02 CET 2004
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 Viera
To: opencms-dev
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/48f78df1/attachment.htm>
More information about the opencms-dev
mailing list