[opencms-dev] Clear Flex Cache
Emiliano Viera
eviera at sdd.com.ar
Fri Jan 30 18:19:01 CET 2004
NachrichtIt worked perfectly!!!!
Vielen Dank!!!
Emiliano
----- Original Message -----
From: Alexander Kandzior
To: opencms-dev at opencms.org
Sent: Friday, January 30, 2004 12:40 PM
Subject: RE: [opencms-dev] Clear Flex Cache
Why not set the "cache" properties of your templates to include "user". Most likley the complete setting would be "cache=uri;user;". In this case one variation is created for every user, and clearing is not required. For more details see the FlexCache documentation...
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
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: Friday, January 30, 2004 4:35 PM
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Clear Flex Cache
The problem is that I have many pages only for registered users (hidden in the menu using the file permissions). And I have a login page. When a registered user logs on and the cache is active, the menus and pages for registered users are not shown. I have to manually flush the cache for these pages become visible.
So I'm looking for a way to clear all the registered pages and menus so they can be visible at user log on.
Thanxs
Emiliano
----- Original Message -----
From: Alexander Kandzior
To: opencms-dev at opencms.org
Sent: Thursday, January 22, 2004 1:00 PM
Subject: RE: [opencms-dev] Clear Flex Cache
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
-----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 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/20040130/d9070ed2/attachment.htm>
More information about the opencms-dev
mailing list