Examples of UDFCacheEntry


Examples of railo.runtime.type.udf.UDFCacheEntry

    Cache cache = Util.getDefault(pc,ConfigImpl.CACHE_DEFAULT_FUNCTION,DEFAULT_CACHE)
    Object o =  cache.getValue(id,null);
   
    // get from cache
    if(o instanceof UDFCacheEntry ) {
      UDFCacheEntry entry = (UDFCacheEntry)o;
      //if(entry.creationdate+properties.cachedWithin>=System.currentTimeMillis()) {
        try {
          pc.write(entry.output);
        } catch (IOException e) {
          throw Caster.toPageException(e);
        }
        return entry.returnValue;
      //}
     
      //cache.remove(id);
    }
     
    // execute the function
    BodyContent bc =  pci.pushBody();
     
      try {
        Object rtn = _call(pci,calledName, args, values, doIncludePath);
        String out = bc.getString();
        cache.put(id, new UDFCacheEntry(out, rtn),properties.cachedWithin,properties.cachedWithin);
        return rtn;
    }
        finally {
          BodyContentUtil.flushAndPop(pc,bc);
        }
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.