Package railo.commons.io.cache

Examples of railo.commons.io.cache.Cache


    return arguments;
  }
 

  private Cache getCache() {
    Cache c = Util.getDefault(ThreadLocalPageContext.get(),ConfigImpl.CACHE_DEFAULT_RESOURCE,DEFAULT_CACHE);
    if(!inits.contains(c.hashCode())){
      String k = toKey("null","");
      if(!c.contains(k)) {
        CacheResourceCore value = new CacheResourceCore(CacheResourceCore.TYPE_DIRECTORY,null,"");
        c.put(k,value,Constants.LONG_ZERO,Constants.LONG_ZERO);
      }
      inits.add(c.hashCode());
    }
    return c;
  }
View Full Code Here


public abstract class CacheItem {

  protected final String fileName;
  public static CacheItem getInstance(PageContext pc, String id, String key, boolean useId, Resource dir, String cacheName, TimeSpan timespan) throws IOException{
    HttpServletRequest req = pc. getHttpServletRequest();
        Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_TEMPLATE,null)
    if(cache!=null)
      return new CacheItemCache(pc, req, id, key, useId, cache,timespan);
    return new CacheItemFS(pc, req, id, key, useId, dir);
  }
View Full Code Here

  //protected abstract void _flushAll(PageContext pc, Resource dir) throws IOException;

  //protected abstract void _flush(PageContext pc, Resource dir, String expireurl) throws IOException;
 
  public static void flushAll(PageContext pc, Resource dir, String cacheName) throws IOException {
    Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_TEMPLATE,null)
    if(cache!=null) CacheItemCache._flushAll(pc, cache);
    else CacheItemFS._flushAll(pc, dir);
  }
View Full Code Here

    if(cache!=null) CacheItemCache._flushAll(pc, cache);
    else CacheItemFS._flushAll(pc, dir);
  }

  public static void flush(PageContext pc, Resource dir, String cacheName,String expireurl) throws IOException, MalformedPatternException {
    Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_TEMPLATE,null)
    if(cache!=null) CacheItemCache._flush(pc, cache,expireurl);
    else CacheItemFS._flush(pc, dir, expireurl);
  }
View Full Code Here

 
  private void doVerifyCacheConnection() throws PageException {
   
   
    try {
      Cache cache = Util.getCache(pageContext.getConfig(), getString("admin",action,"name"));
      if(cache instanceof Cache2)
        ((Cache2)cache).verify();
      else
        cache.getCustomInfo();
    } catch (IOException e) {
      throw Caster.toPageException(e);
    }
    }
View Full Code Here

TOP

Related Classes of railo.commons.io.cache.Cache

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.