保存到缓存中

@param cacheKey
@param value
350936
public void putObect(StringKey ckey, Object value) {
		if (ckey == null)
			return;
		if (cache.contain(ckey.getKey()))
			return;
		cache.put(ckey.getKey(), new CacheableWrapper(ckey.getDataKey(), value));
	}
457727
public void put(Object key, Object value)
    {
        keyTable.put(key, value);
        valueTable.put(value, key);
    }
1059741
public void put(Object key, Object value) {
    int weight = getWeight(key) + getWeight(value) + OVERHEAD;
    currentWeight += weight;
    if (cache.put(key, value == null ? NULL_VALUE : value) != null) {
      currentWeight -= weight;
    }
  }
812366
public
  void saveExprValue(int id, Object value){

   if (tc.isEntryEnabled())
      tc.entry(this,cclass, "saveExprValue", "id: " + new Integer(id) +",value: "+value);
    cacheTag[id] = generation;
    cacheValue[id] = value;
   if (tc.isEntryEnabled())
	 tc.exit(this,cclass, "saveExprValue");
  }
462399
public void cacheDescriptorValue(IAtom atom, IAtomContainer container, IDescriptorResult value) {
        if (cachedDescriptorValues == null) {
            cachedDescriptorValues = new HashMap();
            cachedDescriptorValues.put(PREVIOUS_ATOMCONTAINER, container);
        } else if (cachedDescriptorValues.get(PREVIOUS_ATOMCONTAINER) != container) {
            cachedDescriptorValues.clear();
            cachedDescriptorValues.put(PREVIOUS_ATOMCONTAINER, container);
        }
        cachedDescriptorValues.put(atom, value);
    }
1358777
protected void putToCache(String cacheName, String key, Object value, long ttlSeconds) {
        if (cacheItemsExpireAfterWrite) {
            putToCache(cacheName, key, value, ttlSeconds, 0);
        } else {
            putToCache(cacheName, key, value, 0, ttlSeconds);
        }
    }
156111
protected void disposeCacheValue(T value)
    {
        if (value instanceof DisposableCacheValue) {
            try {
                ((DisposableCacheValue) value).dispose();
            } catch (Throwable e) {
                // We catch Throwable because this method is usually automatically called by an event send by the cache
                // implementation and there is no reason to crash the whole cache because of some badly implemented
                // dispose() we don't control.
                LOGGER.warn("Error when trying to dispose a cache object of cache [{}]",
                    this.configuration != null ? this.configuration.getConfigurationId() : null, e);
            }
        }
    }
1356694
@Override
    public ValueWrapper putIfAbsent(final Object key, final Object value) {
        if (!cache.isEnabled()) {
            LOGGER.warn("Cache {} is disabled. Cannot put value under key {}", cache.getName(), key);
            return null;
        }

        if (key != null) {
            final String cacheKey = getKey(key);

            try {
                LOGGER.info("Put '{}' under key {} to cache {}", new Object[] { value, key, cache.getName() });
                final Object store = toStoreValue(value);
                final boolean added = cache.add(cacheKey, expiration, store, null);
                return added ? null : get(key);
            } catch (TimeoutException | CacheException | RuntimeException e) {
                logOrThrow(e, "An error has ocurred for cache {} and key {}", getName(), cacheKey, e);
            }
        } else {
            LOGGER.info("Cannot put to cache {} because key is null", cache.getName());
        }

        return null;
    }
274469
public function store($cacheKey, $value, $minutes = 30)
    {
        $key = array_search($cacheKey, $this->cachedKeys);

        if ($key == false)
        {
            do
            {
                $key = uniqid();
            }
            while ($this->cache->has($key));

            $this->cachedKeys[$key] = $cacheKey;
            $this->storeCachedKeys();
        }

        $this->cache->put($key, $value, $minutes);
    }
492230
public final boolean append(String key, final Object value, final long timeout)
      throws TimeoutException, InterruptedException, MemcachedException {
    key = this.preProcessKey(key);
    byte[] keyBytes = this.checkStoreArguments(key, 0, value);
    return this.sendStoreCommand(
        this.commandFactory.createAppendCommand(key, keyBytes, value, false, this.transcoder),
        timeout);
  }
450448
public void saveCache(Object dataKey, String modelClassName, Object model) {
		CacheKey cachKey = cacheKeyFactory.createCacheKey(dataKey.toString(), modelClassName);
		saveToCache(cachKey, model);
	}
1076563
private void cacheFieldRefKey(String fieldCacheKey,String idCacheKey,long expired){
		if(nullValueCache){
			getCacheProvider().set(fieldCacheKey, idCacheKey, expired);
		}else{
			getCacheProvider().setStr(fieldCacheKey, idCacheKey, expired);
		}
	}
550573
private void put(String key, JSONObject jsonObject) {
        if (jsonStore.size() > maxCache || jsonStore.size() == Integer.MAX_VALUE) {
            // 清除缓存
            jsonStore.clear();
        }
        jsonStore.put(key, jsonObject);
    }
104239
public function saveInCache($key, $value)
  {
    $this->deleteFromCache($key);
    $this->memcache->set($this->buildMKey($key), serialize($value));
  }
17589
function _cacheData(key, value) {
    cache[key] = { timeStamp: _getTimeStamp(), value: value };
    _deletePromiseWaiting(key);
    return value;
}
287792
public void publishExpired(Cache<K, V> cache, K key, V value) {
    publish(cache, EventType.EXPIRED, key, value, /* newValue */ null, /* quiet */ false);
  }
1168384
private function storeValueInCache($key, $value, $expiration = null)
    {
        $this->cache[$key] = new MemcacheObject($key, serialize($value), $this->normalizeExpirationTime($expiration));
    }