Call this method to a cache entry from the disk.

@param ce
- cache entry.
777220
public void delCacheEntry(CacheEntry ce, int cause, int source, boolean fromDepIdTemplateInvalidation) {
        htod.delCacheEntry(ce, cause, source, fromDepIdTemplateInvalidation);
    }
1324561
@SuppressWarnings("unchecked")
   @CacheEntryModified
   public void cacheEntryModified(CacheEntryModifiedEvent<Serializable, Object> event)
   {
      if (!event.isPre() && event.getKey().equals(namesKey))
      {
         Set<String> set = (Set<String>)event.getValue();
         if (set != null)
         {
            refreshIndexes(set);
         }
      }
   }
925082
@Override
    public synchronized void remove(String key) {
        boolean deleted = getFileForKey(key).delete();
        removeEntry(key);
        if (!deleted) {
            //todo add queue markers
//            JusLog.d("Could not delete cache entry for key=%s, filename=%s",
//                    key, getFilenameForKey(key));
        }
    }
15255
public synchronized void setCache(RemoteListCache cache) {
		if (cache != null && (this.cache == null || !this.cache.isComplete())) {
			this.cache = cache;
		}
	}
1030061
public <R extends Request<T>> R setCacheEntry(Cache.Entry entry) {
        cacheEntry = entry;
        return (R) this;
    }
1070544
private static CacheEntry getOrCreateCacheEntry(final NodeInterface startNode, final NodeInterface endNode) {

		final String cacheKey = cacheKey(startNode, endNode);
		CacheEntry entry      = cache.get(cacheKey);

		if (entry == null) {

			entry = new CacheEntry();
			entry.key = cacheKey;

			cache.put(cacheKey, entry);
		}

		return entry;
	}
931494
public function onFinish(MvcEvent $e)
    {
        if (!$e->getRequest() instanceof HttpRequest || $this->loadedFromCache) {
            return;
        }

        $this->getCacheService()->save($e);
    }
629704
public void run(Cache<G> cache, Code<G> code) throws APIException, IOException {
		code.code(cache, xgen);
	}
141793
private static synchronized void addToCache(Cache cache, byte[] encoding,
            Object value) {
        if (encoding.length > ENC_MAX_LENGTH) {
            return;
        }
        Object key = new Cache.EqualByteArray(encoding);
        cache.put(key, value);
    }
1239412
public void put(final long cacheKey, final FilterJoinTerms terms) {
    logger.debug("{}: New cache entry {}", Thread.currentThread().getName(), cacheKey);
    this.cache.put(cacheKey, new CacheEntry(terms.getEncodedTerms(), terms.getSize(), terms.isPruned()));
  }
1186385
private static void cacheMethod(MethodDescriptor md, Method method) {
        if (CACHE_METHODS) {
            if (method != null) {
                cache.put(md, new WeakReference<Method>(method));
            }
        }
    }
578598
public static void broadcastEvictAll(AdvancedCache cache) {
		final RpcManager rpcManager = cache.getRpcManager();
		if ( rpcManager != null ) {
			// Only broadcast evict all if it's clustered
			final CacheCommandInitializer factory = cache.getComponentRegistry()
					.getComponent( CacheCommandInitializer.class );
			final boolean isSync = isSynchronousCache( cache );

			final EvictAllCommand cmd = factory.buildEvictAllCommand(ByteString.fromString(cache.getName()));
			final RpcOptions options = rpcManager.getDefaultRpcOptions( isSync );
			rpcManager.invokeRemotely( null, cmd, options );
		}
	}
1047049
public static synchronized void clear() {
        for (final Map.Entry<String, Cache> entry : CACHES.entrySet()) {
            final Cache cache = entry.getValue();
            cache.clear();
            LOGGER.log(Level.TRACE, "Cleared cache [name={0}]", entry.getKey());
        }
    }
976065
public void registerCachedFile(String name, DistributedCacheEntry entry) throws IOException {
		if (!this.cacheFile.containsKey(name)) {
			this.cacheFile.put(name, entry);
		} else {
			throw new IOException("cache file " + name + "already exists!");
		}
	}
1158275
public
  void prepareCache(int size){
   if (tc.isEntryEnabled())
      tc.entry(this,cclass, "prepareCache", "size: " + size);

    int oldSize = (cacheTag == null) ? 0 : cacheTag.length;

    if (size <= oldSize) {
      // If the cache is big enough, make sure we are not out of counters
      if (generation == Integer.MAX_VALUE) {
        generation = 1;
        for (int i = 0; i < size; i++)
          cacheTag[i] = 0;
      } else generation++;

    if (tc.isEntryEnabled())
	  tc.exit(this,cclass, "prepareCache");

      return;
    }

    // Allocate fresh

    cacheTag = new int[2*size];
    cacheValue = new Object[2*size];

    // Reset generation since all cache fields are null.
    generation = 1;

    if (tc.isEntryEnabled())
	  tc.exit(this,cclass, "prepareCache");
  }
584103
private void preloadCaches() throws IOException, XmlException {
        Map<String,Properties> caches = getPreloadCacheSpecs();
        for (String cacheName : caches.keySet()) {
            Properties cacheProps = caches.get(cacheName);
            String cacheClassName = cacheProps.getProperty("ClassName");
            logger.info(" - loading cache " + cacheName);
            CacheService cachingObj = getCacheInstance(cacheClassName, cacheProps);
            if (cachingObj != null) {
                long before = System.currentTimeMillis();
                if (cachingObj instanceof PreloadableCache) {
                    ((PreloadableCache)cachingObj).loadCache();
                }
                synchronized(allCaches) {
                    allCaches.put(cacheName, cachingObj);
                }
                logger.debug("    - " + cacheName + " loaded in " + (System.currentTimeMillis() - before) + " ms");
            }
            else {
                logger.warn("Caching Class is  invalid. Name-->"+cacheClassName);
            }
        }
    }
1276581
protected void returnToPool() {
        CacheEntryPool cep = cacheEntryPool;
        // An assertion failure here means this CE is being
        // returned to the pool while in use and this
        // should never be the case;
        assert refCount.get() == 0;
        if (lruHead != null)
            lruHead.remove(this);
        reset();
        cep.add(this);
    }