Get the cache topology

@return Descriptor
325606
public function getTopology() {
		$descriptor = new Descriptor('Memcache', self::TOPOLOGY_BACKEND);
		$descriptor->id = $this->getTopologyId();
		
		if ($this->memcacheClient === null) {
			return $descriptor;
		}
		
		$info = $this->memcacheClient->getextendedstats();
		
		if (count($info) === 1) {
			$serverInfo = current($info);
			
			$descriptor->host = key($info);
			
			$used  = $serverInfo['bytes'];
			$limit = $serverInfo['limit_maxbytes'];
		} else {
			$used   = 0;
			$limit  = 0;
			$hostNm = 0;
			
			foreach ($info as $serverKey => $serverInfo) {
				$used  += $serverInfo['bytes'];
				$limit += $serverInfo['limit_maxbytes'];

				$descriptor->setProperty('host.' . $hostNm ++, $serverKey);
			}
		}
		
		$memoryFormatter = new Memory();
		
		$descriptor->version = $serverInfo['version'];
		$descriptor->used    = $memoryFormatter->format($used);
		$descriptor->limit   = $memoryFormatter->format($limit);
		$descriptor->filled  = round($used / $limit * 100, 2) . '%';
		
		return $descriptor;
	}
298442
protected function getCacheDir()
    {
        $cacheDir = $this->container->getParameter("kernel.cache_dir");
        $cacheDir = rtrim($cacheDir, '/');
        $cacheDir .= '/' . self::FEED_CACHE_DIR . '/';

        return $cacheDir;
    }
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
                       ));
    }
1009641
public function getCacheInstance()
    {
        if (null === $this->cacheInstance) {
            $this->cacheInstance = $this->cacheManager->getCache(self::CACHE_IDENTIFIER);
        }

        return $this->cacheInstance;
    }
894997
protected function get_cache_identifier() {
        $identifiers = array();
        if ($this->selectedsharingoption & self::SHARING_ALL) {
            // Nothing to do here.
        } else {
            if ($this->selectedsharingoption & self::SHARING_SITEID) {
                $identifiers[] = cache_helper::get_site_identifier();
            }
            if ($this->selectedsharingoption & self::SHARING_VERSION) {
                $identifiers[] = cache_helper::get_site_version();
            }
            if ($this->selectedsharingoption & self::SHARING_INPUT && !empty($this->userinputsharingkey)) {
                $identifiers[] = $this->userinputsharingkey;
            }
        }
        return join('/', $identifiers);
    }
695833
public function getTopology() {
		$descriptor = new Descriptor('Phalcon', self::TOPOLOGY_BACKEND);
		$descriptor->id = $this->getTopologyId();
		
		$backend = $this->getBackend();
		$class   = get_class($backend);
		$title   = substr($class, strrpos($class, '\\') + 1);
		
		$descBackend = new Descriptor($title, self::TOPOLOGY_SPECIAL);
		
		$options = $backend->getOptions();
		
		if (! empty($options)) {
			$this->handleBackendOptions($descBackend, $options);
		}
		
		$descriptor[] = $descBackend;
		
		return $descriptor;
	}
1234943
protected function getCache()
    {
        $cache = $this->getCacheDriver();

        return $this->cacheTags ? $cache->tags($this->cacheTags) : $cache;
    }
216020
protected function getCache()
    {
        $cache = $this->connection->getCacheManager()->driver($this->cacheDriver);

        return $this->cacheTags ? $cache->tags($this->cacheTags) : $cache;
    }
630439
public function getChannelDescriptor()
    {
        $descriptor = self::TECHNOLOGY .'/';
        if ($this->isGroup) {
            $descriptor .= $this->descendantOrder
                ? 'G'
                : 'g';
        }

        $descriptor .= $this->identifier.'/' .$this->target;

        return $descriptor;
    }
1257784
public static function getMapping()
    {
        $instance = new static;
        $params = $instance->basicElasticParams();

        return $instance->getElasticClient()->indices()->getMapping($params);
    }
72148
protected function getCacheEngine()
    {
        if (!isset($this->cacheEngineClasses[$this->type])) {
            throw new OutOfBoundsException($this->translate(
                'Cache engine type "{type}" does not exist.',
                ['type' => $this->type]
            ));
        }

        $options = $this->configToArray($this->options, true);

        return $this->getPrototype(
            $this->cacheEngineClasses[$this->type],
            ['umi\cache\engine\ICacheEngine']
        )
            ->createSingleInstance([$options]);
    }
593604
public function getChannelDescriptor()
    {
        $descriptor = self::TECHNOLOGY .'/' .$this->target;

        if (null !== $this->provider) {
            $descriptor .= '@' .$this->provider;
        }

        return $descriptor;
    }
398964
public function getTopology() {
		$descriptor = new Descriptor('Factory', self::TOPOLOGY_FRONTEND);
		
		if ($this->_defaultLifetime === null) {
			$descriptor->lifetime = 'n/a';
		} else {
			$descriptor->lifetime = $this->_defaultLifetime;
		}
		
		$descriptor->created = count($this->_wrappers);
		
		$backend = $this->getBackend();
		
		if ($backend instanceof TopologyInterface) {
			$descriptor[] = $backend->getTopology();
		}
		
		return $descriptor;
	}
872897
protected function getInitializedCache()
    {
        $cacheIdentifier = 'tx_solr';
        try {
            $cacheInstance = GeneralUtility::makeInstance(CacheManager::class)->getCache($cacheIdentifier);
        } catch (NoSuchCacheException $e) {
            /** @var t3lib_cache_Factory $typo3CacheFactory */
            $typo3CacheFactory = $GLOBALS['typo3CacheFactory'];
            $cacheInstance = $typo3CacheFactory->create($cacheIdentifier, $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheIdentifier]['frontend'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheIdentifier]['backend'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheIdentifier]['options']);
        }

        return $cacheInstance;
    }
978065
public function getCachedContent()
    {
        if ($this->_content !== null) {
            return $this->_content;
        }

        $this->_content = false;

        if (!($this->cache instanceof CacheInterface)) {
            return $this->_content;
        }

        $key = $this->calculateKey();
        $data = $this->cache->get($key);
        if (!is_array($data) || count($data) !== 2) {
            return $this->_content;
        }

        [$this->_content, $placeholders] = $data;
        if (!is_array($placeholders) || count($placeholders) === 0) {
            return $this->_content;
        }

        $this->_content = $this->updateDynamicContent($this->_content, $placeholders, true);

        return $this->_content;
    }
951816
protected function getCacheItemPool()
    {
        $cacheItemPool = cache()->getObject('default');

        if (cache()->exists('sso')) {
            $cacheItemPool = cache()->getObject('sso');
        }

        return $cacheItemPool;
    }
1182320
protected function getCachedMapping()
    {
        $cache = SS_Cache::factory('gridfieldimporter');
        if ($result = $cache->load($this->cacheKey())) {
            return unserialize($result);
        }
    }