[opencms-dev] Scheduled Job to Clear FlexCache

marcio.camurati marcio.camurati.opencms at gmail.com
Tue Jun 10 16:48:22 CEST 2008


Hi,

If you use the same that the OpenCMS Core use at the publish event:

OpenCms.getMemoryMonitor().clearCache();

This call clear all cache, I think that it call help you at this scheduled
job.

Regards.
Marcio Camurati


Isaac R. Higgins wrote:
> 
> 
> Hi all,
> 
> I am trying to create a scheduled job that clears the flex cache on an
> interval.  Has anyone done this or can anyone help me out.  I have tried a
> million things and am still stuck.  Here's my current launch()
> 
> public String launch_old(CmsObject cms, Map parameters) throws Exception {
>         CmsFlexCache cache = new CmsFlexCache(new
> CmsFlexCacheConfiguration());
>         javax.servlet.http.HttpServletRequest req = null;
>         javax.servlet.http.HttpServletResponse res = null;
>         CmsFlexController controller = new
> CmsFlexController(cms,cms.readResource("/"),cache, req, res,false,false);
>         controller.clear();
>         return "Cache Cleared.";
> }
> 
> My biggest problem is I don't know how to get the objects in my function
> to use the objects from OpenCms such as the request and response vars.
> 
> Thanks,
> Isaac
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 

-- 
View this message in context: http://www.nabble.com/Scheduled-Job-to-Clear-FlexCache-tp11367272p17757274.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list