Package com.opensymphony.oscache.web

Examples of com.opensymphony.oscache.web.ServletCacheAdministrator


{
    public final static Logger logger = Logger.getLogger(OSCacheUtility.class.getName());

  public static void setServletCacheParams(ServletContext context)
  {
    ServletCacheAdministrator servletCacheAdministrator = ServletCacheAdministrator.getInstance(context);
    servletCacheAdministrator.flushAll();
    Cache cache = servletCacheAdministrator.getAppScopeCache(context);
   
    servletCacheAdministrator.setAlgorithmClass("com.opensymphony.oscache.base.algorithm.ImprovedLRUCache");
   
    int capacity = 5000;

    String cacheCapacity = (String)CmsPropertyHandler.getCacheSettings().get("CACHE_CAPACITY_oscache_ServletCache");
    if(logger.isInfoEnabled())
View Full Code Here


  {
      String returnValue = handleAccess(this.getRequest());
      if(returnValue != null)
        return returnValue;

    ServletCacheAdministrator servletCacheAdministrator = ServletCacheAdministrator.getInstance(ActionContext.getServletContext());
    servletCacheAdministrator.flushAll();
    Cache cache = servletCacheAdministrator.getAppScopeCache(ActionContext.getServletContext());
   
    OSCacheUtility.clear(cache);
   
    return "cleared";
  }
View Full Code Here

    return cacheNames;
  }

  public ServletCache getOSCache()
  {
    ServletCacheAdministrator servletCacheAdministrator = ServletCacheAdministrator.getInstance(ActionContext.getServletContext());
    ServletCache applicationCache = (ServletCache)servletCacheAdministrator.getAppScopeCache(ActionContext.getServletContext());
       
    return applicationCache;
  }
View Full Code Here

TOP

Related Classes of com.opensymphony.oscache.web.ServletCacheAdministrator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.