Package railo.commons.io.cache

Examples of railo.commons.io.cache.Cache.entries()


  @Override
  public void clearUnused(PageContext pc) throws IOException {
   
    Cache c = getCache(pc);
    List<CacheEntry> entries = c.entries();
    if(entries.size()<100) return;
   
    Iterator<CacheEntry> it = entries.iterator();
    while(it.hasNext()){
      it.next(); // touch them to makes sure the cache remove them, not really good, cache must do this by itself
View Full Code Here


    } catch (IOException e) {}
    }

  private void _clear(PageContext pc,QueryCacheFilter filter) throws IOException {
    Cache c = getCache(pc);
    Iterator it = c.entries().iterator();
      String key;
      CacheEntry entry;
      QueryCacheEntry ce;
      Query q;
      while(it.hasNext()){
View Full Code Here

  }

  private void clean(CacheConnection cc, ConfigWebImpl config) throws IOException {
    Cache cache = cc.getInstance(config);
    int len=filter.length(),index;
    List<CacheEntry> entries = cache.entries(filter);
    CacheEntry ce;
    long expires;
   
    String key,appname,cfid;
    if(entries.size()>0){
View Full Code Here

  }
 
  public static Struct call(PageContext pc,String filter, String cacheName) throws PageException {
    try {
      Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_OBJECT);
      List<CacheEntry> entries = CacheGetAllIds.isFilter(filter)?cache.entries(new WildCardFilter(filter,true)):cache.entries();
      Iterator<CacheEntry> it=entries.iterator();
      Struct sct = new StructImpl();
      CacheEntry entry;
      while(it.hasNext()){
        entry= it.next();
View Full Code Here

  }
 
  public static Struct call(PageContext pc,String filter, String cacheName) throws PageException {
    try {
      Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_OBJECT);
      List<CacheEntry> entries = CacheGetAllIds.isFilter(filter)?cache.entries(new WildCardFilter(filter,true)):cache.entries();
      Iterator<CacheEntry> it=entries.iterator();
      Struct sct = new StructImpl();
      CacheEntry entry;
      while(it.hasNext()){
        entry= it.next();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.