Get the cache topology

@return Descriptor
506052
public function getTopology() {
		$descriptor = new Descriptor('Frontend', self::TOPOLOGY_FRONTEND);
		
		if ($this->_namespace !== null) {
			$descriptor->namespace = $this->_namespace;
		}
		
		$descriptor->lifetime  = $this->_defaultLifetime;
		
		$backend = $this->getBackend();
		
		if ($backend instanceof TopologyInterface) {
			$descriptor[] = $backend->getTopology();
		}
		
		return $descriptor;
	}
1234803
def get_topology(self):
        
        topology = {'name': self._name,
                    'resources_type': 'local',
                    'topology': {},
                    'type': 'topology',
                    'version': '1.0'}

        if self._links:
            topology['topology']['links'] = self._links
        if self._nodes:
            topology['topology']['nodes'] = self._nodes
        if self._servers:
            topology['topology']['servers'] = self._servers
        if self._notes:
            topology['topology']['notes'] = self._notes
        if self._shapes['ellipse']:
            topology['topology']['ellipses'] = self._shapes['ellipse']
        if self._shapes['rectangle']:
            topology['topology']['rectangles'] = \
                self._shapes['rectangle']
        if self._images:
            topology['topology']['images'] = self._images

        return topology
698283
public function getCacheDir(): string
    {
        if ($this->_cache_dir === null)
            $this->_cache_dir = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'cache');

        return $this->_cache_dir;
    }
664283
public function getCache()
    {
        $data = $this->memcache->get(
            $this->config['key_prefix'] .
            '.storage'
        );
        $this->isCached = !empty($data);

        return $data;
    }
508805
private function getEndpointsCache() 
    {
        if ($this->_cache === null) {
            if (!isset($this->_values[self::OPTION_MEMCACHED_SERVERS])) {
                return null;
            }
            if (!class_exists('Memcached', false)) {
                return null;
            }

            $servers = $this->_values[self::OPTION_MEMCACHED_SERVERS];
            if (!is_array($servers)) {
                throw new ClientException('Invalid memcached servers list. should be an array of servers');
            }

            $cache = new \Memcached(self::OPTION_MEMCACHED_PERSISTENT_ID);
            if (empty($cache->getServerList())) {
                $cache->addServers($servers);
            }
            
            if (isset($this->_values[self::OPTION_MEMCACHED_OPTIONS])) {
                $options = $this->_values[self::OPTION_MEMCACHED_OPTIONS];
                if (!is_array($options)) {
                    throw new ClientException('Invalid memcached options list. should be an array of options');
                }
                $cache->setOptions($options);
            }

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

        return $this->cacheInstance;
    }
22924
public function getCached()
    {
        $cached = $this->cache->get(
            $this->getCacheKey(),
            []
        );

        return $this->formatCache($cached);
    }
224651
public function get_identifier() {
        static $instances = 0;
        if ($this->lockidentifier === null) {
            $this->lockidentifier = md5(
                $this->get_definition()->generate_definition_hash() .
                sesskey() .
                $instances++ .
                'cache_application'
            );
        }
        return $this->lockidentifier;
    }
592974
public function getCacheKey()
    {
        if (is_null($this->cacheKey)) {
            return $this->prefix.$this->id;
        }

        return $this->cacheKey;
    }
1181376
public function getDefinitionCache(): array
    {
        return [
            $this->name,
            $this->methods,
            $this->segments,
            $this->patterns,
            $this->handler,
            $this->format,
            $this->parameterNames,
        ];
    }
1115627
public function getTopology() {
		$descriptor  = new Descriptor('Taggable', Descriptor::TYPE_SUCCESS);
		$backend     = $this->getBackend();
		$tagsBackend = $this->getTagHolderBackend();
		
		$descriptor->id = $this->getTopologyId();
		
		if ($backend instanceof TopologyInterface) {
			if ($tagsBackend instanceof TopologyInterface) {
				if ($backend->getTopologyId() === $tagsBackend->getTopologyId()) {
					$descriptor[] = $backend->getTopology();
					
					return $descriptor;
				}
				
				$descriptor['data'] = $backend->getTopology();
				$descriptor['tags'] = $tagsBackend->getTopology();
				
				return $descriptor;
			}
			
			$descriptor[] = $backend->getTopology();
		}
		
		return $descriptor;
	}
659191
public function getCache()
    {
        if ($this->cache) {
            return $this->cache;
        }

        if (property_exists($this, 'app') && $this->app instanceof ServiceContainer
            && isset($this->app['cache']) && $this->app['cache'] instanceof CacheInterface) {
            return $this->cache = $this->app['cache'];
        }

        return $this->cache = $this->createDefaultCache();
    }
213122
public function getCacheDir()
    {
        $fileSystem = new Filesystem();
        $path = 'var/cache/assets/'.$this->name.'/';
        
        if (!$fileSystem->exists($path)) {
            $fileSystem->mkdir($path);
        }
        
        return $path;
    }
1371584
public function getCacheFrontendFactory() {
		if ($this->_cacheFrontendFactory === null) {
			if ($this instanceof LocatorAwareInterface && $this->hasLocator()) {
				$locator   = $this->getLocator();
				$serviceId = $this->getCacheFrontendFactoryServiceId();
				
				if ($locator->has($serviceId)) {
					$this->_cacheFrontendFactory = $locator->get($serviceId);
					return $this->_cacheFrontendFactory;
				}
			}
			
			throw new NoFrontend('Unable to provide the cache frontend\'s factory');
		}
		
		return $this->_cacheFrontendFactory;
	}
718805
public function getMetadataCacheDriver()
    {
        if (!$this->metadataCacheDriver instanceof CacheProvider) {
            $metadataCacheDriver = $this->getOption('metadata_cache_driver');

            if (!$metadataCacheDriver instanceof CacheProvider) {
                $metadataCacheDriver = CacheBuilder::build();
            }

            if ($metadataCacheDriver->getNamespace() === '') {
                $metadataCacheDriver->setNamespace((string) $this->getOption('metadata_cache_namespace'));
            }

            $this->metadataCacheDriver = $metadataCacheDriver;
        }

        return $this->metadataCacheDriver;
    }
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);
    }