This method is called when the cache is created. This will initialize ExpirationMetaData for specified cache

@param cache The cache instance.
11314
public void createExpirationMetaData(DCache cache) {
        //final String methodName = "createExpirationMetaData()";
        ExpirationMetaData expirationMetaData = (ExpirationMetaData)cacheInstancesTable.get(cache);
        if (expirationMetaData == null) {
            int initialTableSize = DEFAULT_SIZE_FOR_MEM;
            if (cache.getSwapToDisk() && cache.getCacheConfig().getDiskCachePerformanceLevel() == CacheConfig.HIGH) {
                initialTableSize = DEFAULT_SIZE_FOR_MEM_DISK;
            }
            expirationMetaData = new ExpirationMetaData(initialTableSize);
            cacheInstancesTable.put(cache, expirationMetaData);
        }
    }
64350
public static void setMainCache(String cacheName) {
		if (StrKit.isBlank(cacheName))
			throw new IllegalArgumentException("cacheName can not be blank");
		cacheName = cacheName.trim();
		Cache cache = cacheMap.get(cacheName);
		if (cache == null)
			throw new IllegalArgumentException("the cache not exists: " + cacheName);
		
		Redis.mainCache = cache;
	}
634373
function ExpiresDecorator(cache, config) {
  BaseDecorator.call(this, cache, config, joi.object().keys({
    expiresIn: joi.number().integer().min(0).default(Infinity),
    staleIn: joi.number().integer().min(0).default(Infinity)
  }));
  this.on('set:after', this.setCreatedAt.bind(this));
  this._store = this._getStore();
}
170349
@Override
    public void configureWriteCache(long initDelay, long delayCache, long cacheSize){
        client.initTimer(initDelay, delayCache,cacheSize);
    }
792965
def set_metadata_cache(cache):
    
    global _METADATA_CACHE

    if _METADATA_CACHE and _METADATA_CACHE.is_open:
        _METADATA_CACHE.close()

    _METADATA_CACHE = cache
1182516
public void clear(NewRelicCache cache)
    {
        if(cache == null)
            throw new IllegalArgumentException("null cache");
        cache.applications().clear();
        cache.browserApplications().clear();
        cache.mobileApplications().clear();
        cache.plugins().clear();
        cache.monitors().clear();
        cache.servers().clear();
        cache.entities().clear();
        cache.alertPolicies().clear();
        cache.alertChannels().clear();
        cache.dashboards().clear();
    }
756212
public static void releaseCache(URI cache, Configuration conf, long timeStamp)
    throws IOException {
    String cacheId = getKey(cache, conf, timeStamp);

    synchronized (cachedArchives) {
      CacheStatus lcacheStatus = cachedArchives.get(cacheId);
      if (lcacheStatus == null) {
        LOG.warn("Cannot find localized cache: " + cache +
                 " (key: " + cacheId + ") in releaseCache!");
        return;
      }
      lcacheStatus.refcount--;
    }
  }
785367
protected void putToCache(String cacheName, String key, Object value,
            long expireAfterWriteSeconds, long expireAfterAccessSeconds) {
        try {
            ICache cache = getCache(cacheName);
            if (value != null && cache != null) {
                cache.set(key, value, expireAfterWriteSeconds, expireAfterAccessSeconds);
            }
        } catch (CacheException e) {
            LOGGER.warn(e.getMessage(), e);
        }
    }
1090426
def cache_set(self, to_cache):
        
        self.cache.set(self.cache_key, to_cache, self.expire_time)
257080
public static void initialize()
    {
        if (InfinispanCache.get().exists(DBProperties.CACHENAME)) {
            InfinispanCache.get().<String, String>getCache(DBProperties.CACHENAME).clear();
        } else {
            InfinispanCache.get().<String, String>getCache(DBProperties.CACHENAME)
                            .addListener(new CacheLogListener(DBProperties.LOG));
        }
        DBProperties.cacheOnStart();
    }
24916
public void purge(String cacheKey) {
        try {
            if (useMemoryCache) {
                if (memoryCache != null) {
                    memoryCache.remove(cacheKey);
                }
            }

            if (useDiskCache) {
                if (diskLruCache != null) {
                    diskLruCache.remove(cacheKey);
                }
            }
        } catch (Exception e) {
            Log.w(TAG, "Could not remove entry in cache purge", e);
        }
    }
340451
@Inject
   protected void init(EmbeddedCacheManager cacheManager, InternalCacheRegistry internalCacheRegistry) {
      this.cacheManager = cacheManager;
      internalCacheRegistry.registerInternalCache(PROTOBUF_METADATA_CACHE_NAME,
            getProtobufMetadataCacheConfig().build(),
            EnumSet.of(Flag.USER, Flag.PROTECTED, Flag.PERSISTENT));
   }
1115830
public void initTimer(){
		stopTimer();
		if(this.WRITE_CACHE_ENABLED) {
			logger.debug("configuring write cache with defaults");
			timerWriteCache = new TripleWriteCache(this);
			writeTimer = new Timer();
			writeTimer.scheduleAtFixedRate(timerWriteCache, TripleWriteCache.DEFAULT_INITIAL_DELAY, TripleWriteCache.DEFAULT_CACHE_MILLIS);
		}
		if(this.DELETE_CACHE_ENABLED) {
			logger.debug("configuring delete cache with defaults");
			timerDeleteCache = new TripleDeleteCache(this);
			deleteTimer = new Timer();
			deleteTimer.scheduleAtFixedRate(timerDeleteCache, TripleDeleteCache.DEFAULT_INITIAL_DELAY, TripleDeleteCache.DEFAULT_CACHE_MILLIS);
		}
	}
629704
public void run(Cache<G> cache, Code<G> code) throws APIException, IOException {
		code.code(cache, xgen);
	}
581143
public static synchronized void
setDefaultCache(Cache cache, int dclass) {
	DClass.check(dclass);
	defaultCaches.put(Mnemonic.toInteger(dclass), cache);
}
1219187
private <T> T loadDataFromCache(final Class<T> clazz, final Object cacheKey, final long maxTimeInCacheBeforeExpiry) throws CacheLoadingException, CacheCreationException {
        return cacheManager.loadDataFromCache(clazz, cacheKey, maxTimeInCacheBeforeExpiry);
    }
561275
public void setExpiration(String expiration) {
        if (expiration == null) {
            _properties.remove(AMQP_PROP_EXPIRATION);
            return;
        }
        
        _properties.put(AMQP_PROP_EXPIRATION, expiration);
    }