Get a list of known caches. Depending on the configuration, caches may be created
dynamically without providing a configuration for a specific cache name. Because of this
combine the known names from configuration and activated caches.
552397
@Override
  public Collection<String> getCacheNames() {
    Set<String> cacheNames = new HashSet<>();
    for (org.cache2k.Cache<?,?> cache : manager.getActiveCaches()) {
      cacheNames.add(cache.getName());
    }
    cacheNames.addAll(configuredCacheNames);
    return Collections.unmodifiableSet(cacheNames);
  }
1063181
private function getCachedKeys()
    {
        $key = 'courier_cached_requests';

        if ($this->cache->isExisting($key))
        {
            return $this->cache->get($key);
        }

        $newIndex = [];
        $this->cache->set($key, $newIndex);

        return $newIndex;
    }
765851
def get_values(self):
		
		return [self._cache.get(i.name,None) for i in self._original_evals]
368494
protected List<String> getNameCache(Class cls, String pkgname) {
    return m_CacheNames.get(cls.getName() + "-" + pkgname);
  }
220044
def cached(key, path_info, details, locals)
      name, prefix, partial = path_info

      if key
        @cache.cache(key, name, prefix, partial, locals) do
          yield
        end
      else
        yield
      end
    end
1198742
public java.util.List<ReservedCacheNode> getReservedCacheNodes() {
        if (reservedCacheNodes == null) {
            reservedCacheNodes = new com.amazonaws.internal.SdkInternalList<ReservedCacheNode>();
        }
        return reservedCacheNodes;
    }
1204712
def tryload_cache_list(dpath, fname, cfgstr_list, verbose=False):
    
    data_list = [tryload_cache(dpath, fname, cfgstr, verbose) for cfgstr in cfgstr_list]
    ismiss_list = [data is None for data in data_list]
    return data_list, ismiss_list
383318
private function getCachedStats()
    {
        if (!Cache::has(self::CACHE_NAME)) {
            $this->initCachedStats();
        }

        return new Collection(
            Cache::get(self::CACHE_NAME)
        );
    }
819420
def get_cache_settings(self, service_id, version_number, name):
		""""""
		content = self._fetch("/service/%s/version/%d/cache_settings/%s" % (service_id, version_number, name))
		return FastlyCacheSettings(self, content)
399949
public function getCached()
    {
        $cache = $this->cache->get('config');
        if ($cache === false) {
            $cache = $this->notCached;
            $this->cache->set('config', $cache);
        }
        return $cache;
    }
1277999
protected function loadCache(): array
    {
        if ($this->_cache === null)
            $this->_cache = Cacher::getInstance()->get($this->getCacheName());

        return $this->_cache;
    }
1189681
private Set<CacheKey> getCacheKeys() {
        Set<CacheKey> cacheKeys = new HashSet<CacheKey>();
        Applications apps = registry.getApplicationsFromLocalRegionOnly();
        for (Application app : apps.getRegisteredApplications()) {
            for (InstanceInfo instanceInfo : app.getInstances()) {
                String localAccountId = getAccountId(instanceInfo, accountId);
                String asgName = instanceInfo.getASGName();
                if (asgName != null) {
                    CacheKey key = new CacheKey(localAccountId, asgName);
                    cacheKeys.add(key);
                }
            }
        }

        return cacheKeys;
    }
516533
def cache(self):
        """"""
        if self._cache is None:
            self._cache = django_cache.get_cache(self.cache_name)
        return self._cache
167153
public function listCache()
    {

        $newlist = array();

        foreach ($this->cacheListing as $key => $val) {
            $newlist [$key] = new \stdClass();

            foreach ($val as $skey => $sval) {
                $newlist [$key]->$skey = $sval;
            }
        }

        $this->list = $newlist;

        return true;
    }
1246639
private CachedProviderServiceInstance getCachedServiceInstance(
            String serviceName, String providerId) {
        try {
            read.lock();
            ServiceInstanceId id = new ServiceInstanceId(serviceName, providerId);
            return getCacheServiceInstances().get(id);
        } finally {
            read.unlock();
        }
    }
1237381
@Read
    public Single<Map<String, Object>> getCaches() {
        return Flowable.fromIterable(cacheManager.getCacheNames())
                       .flatMapMaybe(n -> Flowable.fromPublisher(cacheManager.getCache(n).getCacheInfo()).firstElement())
                       .reduce(new HashMap<>(), (seed, info) -> {
                           seed.put(info.getName(), info.get());
                           return seed;
                       }).map(objectObjectHashMap -> Collections.singletonMap(
                           NAME, objectObjectHashMap
                       ));
    }
1153630
def many_from_cache(self, preferences):
        
        keys = {
            p: self.get_cache_key(p.section.name, p.name)
            for p in preferences
        }
        cached = self.cache.get_many(list(keys.values()))

        for k, v in cached.items():
            # we replace dummy cached values by None here, if needed
            if v == preferences_settings.CACHE_NONE_VALUE:
                cached[k] = None

        # we have to remap returned value since the underlying cached keys
        # are not usable for an end user
        return {
            p.identifier(): p.serializer.deserialize(cached[k])
            for p, k in keys.items()
            if k in cached
        }