--- CREATE CACHE KEY ---
550738
protected String getCacheKey(String name, Groups groups) {
		if (groups == null) {
			return name;
		}
		StringBuilder tmp = new StringBuilder(64);
		tmp.append(name);
		for (String group : groups.groups()) {
			tmp.append('|');
			tmp.append(group);
		}
		return tmp.toString();
	}
41793
function getCache() {
      return new Promise(function(resolve, reject) {
        // create and fetch the cache key
        get(getKey(), function(err, data) {
          if (err) {
            return reject(err);
          }
          resolve(data);
        });
      });
    }
392389
public Object createObjectCache(String cacheName) throws DynamicCacheServiceNotStarted, IllegalStateException {
    	if (objectCacheUnit == null) {
    		throw new DynamicCacheServiceNotStarted("Object cache service has not been started."); 
    	}
    	return objectCacheUnit.createObjectCache(cacheName);
    }
862496
static void addToCache(String key, MPApiResponse response) {
        HashMap<String, MPApiResponse> mapCache = getMapCache();
        mapCache.put(key, response);
    }
588810
@Override
    public Cache getCache(String cacheName) throws CacheException
    {
        if (this.cache == null)
        {
            this.cache = createCache(cacheName);
        }

        return this.cache;
    }
450448
public void saveCache(Object dataKey, String modelClassName, Object model) {
		CacheKey cachKey = cacheKeyFactory.createCacheKey(dataKey.toString(), modelClassName);
		saveToCache(cachKey, model);
	}
910581
function createCacheKey(namespace, args) {
  args = Array.prototype.slice.apply(args);
  return namespace + '(' + _.map(args, function(a){ return JSON.stringify(a); }).join(',') + ')';
}
391059
def cache_key(self, method_name):
        """"""
        key = ""
        method = getattr(self, "cache_key_{}".format(method_name), None)
        if method:
            key = method()

        return key
1267726
function createLocalCache() {
    var localCache = lruCache({ max: 100, maxAge: 60000 });
    return {
        get: function (key) {
            return new Q(localCache.get(key));
        },
        set: function (key, value) {
            localCache.set(key, value);
        },
        del: function (key) {
            localCache.set(key, null);
        }
    };
}
1065272
public function buildCache($table = null, $key = null, $cache = null)
    {
        if ($this->sql &&
            ($table === null || $this->setTableName($table)) &&
            ($key === null || $this->setKeyName($key)) &&
            ($cache === null || $this->setCacheName($cache))) {
            if ($this->sql->query("
                CREATE TABLE IF NOT EXISTS `{$this->table}` (
                    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
                    `{$this->key}` text NOT NULL,
                    `{$this->cache}` longtext NOT NULL,
                    `expire` timestamp NULL DEFAULT NULL,
                    `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                    PRIMARY KEY (`id`)
                );
            ")) {
                $this->initialized = true;

                /* Upgrade older cache tables for longer cache data */
                $this->sql->query("
                    ALTER TABLE `{$this->table}` CHANGE `{$this->cache}` `{$this->cache}` longtext NOT NULL;
                ");

                /* Upgrade older cached tables to include an expire column for each row */
                $this->sql->query("
                    ALTER TABLE `{$this->table}` ADD `expire` timestamp NULL DEFAULT NULL AFTER `{$this->cache};
                ");
            }
        }
        return $this->initialized;
    }
581944
public static void cache(XmlFileModel key, Document document)
    {
        String cacheKey = getKey(key);
        map.put(cacheKey, new CacheDocument(false, document));
    }
1252448
function(key) {
    var filepath = this._makeFilepath(key);
    if (!fs.existsSync(filepath)) {
      return;
    }

    var cache = JSON.parse(fs.readFileSync(filepath), 'UTF8');

    if (!this._cacheIsValid(cache)) {
      return this.delSync(key);
    }

    return cache.data;
  }
863651
void putKey(CmsFlexCacheKey key) {

        if (!isEnabled()) {
            return;
        }
        Object o = m_keyCache.get(key.getResource());
        if (o == null) {
            // No variation map for this resource yet, so create one
            CmsFlexCacheVariation variationMap = new CmsFlexCacheVariation(key);
            m_keyCache.put(key.getResource(), variationMap);
            if (LOG.isDebugEnabled()) {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_ADD_KEY_1, key.getResource()));
            }
        }
        // If != null the key is already in the cache, so we just do nothing
    }
422640
public void put(String key, String value) {
        synchronized (this.cache) {
            this.cache.put(key, value);
        }
    }
902252
def cache_key(self):
        """"""
        try:
            return self.path
        except TypeError:
            raise TypeError("self.path is invalild: '{}', '{}'".format(str(self.path), type(self.path)))
108608
@Override
	public synchronized CacheObject get(final Object key)
	{
		final CacheObject o = map.get(key);
		if (o != null) {
			updateAccess(o);
			++hits;
		}
		else
			++misses;
		return o;
	}
580724
public void publishCreated(Cache<K, V> cache, K key, V value) {
    publish(cache, EventType.CREATED, key, /* newValue */ null, value, /* quiet */ false);
  }