Package com.dotmarketing.business

Examples of com.dotmarketing.business.BlockDirectiveCache


    if(LicenseUtil.getLevel() <100){
      return;
    }
    long start = System.currentTimeMillis();
    Logger.info(this.getClass(), "Running CleanBlockCacheScheduledTask");
    BlockDirectiveCache bdc= CacheLocator.getBlockDirectiveCache();
    DotCacheAdministrator dca = CacheLocator.getCacheAdministrator();
    Set<String> keys= dca.getKeys(bdc.getPrimaryGroup());
    long x = 0;
    for(String key : keys){
      BlockDirectiveCacheObject bo = bdc.get(key);
      if(bo != null && bo.getCreated() + (bo.getTtl() * 1000) < System.currentTimeMillis()) {
        bdc.remove(key);
        x++;
      }
    }
    long end = System.currentTimeMillis();
    Logger.info(this.getClass(), "Ending CleanBlockCacheScheduledTask - cleaned " + x + " entries in " + (end-start)/1000 + " seconds");
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.BlockDirectiveCache

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.