Get lessphp cache object

@return array
509373
private function getCache()
    {
        // cache for single run
        // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)
        if (isset($this->parsed)) {
            return $this->parsed;
        }

        // check from cache first
        $cache = null;
        $cacheId = $this->getCacheId();
        if ($this->cache->isValid($cacheId, 0)) {
            if ($cache = $this->cache->fetch($cacheId)) {
                $cache = unserialize($cache);
            }
        }

        $less = $this->getCompiler();
        $input = $cache ? $cache : $this->filepath;
        $cache = $less->cachedCompile($input);

        if (!is_array($input) || $cache['updated'] > $input['updated']) {
            $cache['lastModified'] = $this->getMaxLastModified($cache);
            $this->cache->store($cacheId, serialize($cache));
        }

        return $this->parsed = $cache;
    }
648236
private function cachedAllPerStore() {
		if (!isset($this->{__METHOD__})) {
			$this->{__METHOD__} = array_merge($this->cachedI(), $this->cachedObjectsI());
		}
		return $this->{__METHOD__};
	}
1279022
public function getCacheService()
    {
        $memcached = $this->memcached;
        if (empty($memcached)) {
            /**
             * @var \Zend\Cache\Storage\Adapter\Memcached $memcached
             */
            $memcached = $this->getServiceLocator()->get('memcached');
        }

        return $memcached;
    }
186333
protected function get() {
        return $this->cache->get('yasmin-ratelimiter-'.$this->endpoint, null, true)->then(null, function () {
            return array('limit' => 0, 'remaining' => 0, 'resetTime' => null);
        });
    }
1114079
public static function flushAll()
    {
        $cachesInfo = [];
        if (empty($caches = self::findCaches())) {
            return $cachesInfo;
        }
        
        foreach ($caches as $name => $class) {
            $cachesInfo[] = [
                'name' => $name,
                'class' => $class,
                'is_flushed' => self::canBeFlushed($class) ? Yii::$app->get($name)->flush() : false,
            ];
        }
        
        return $cachesInfo;
    }
1012316
public function clean()
    {
        try {
            $result = [
                'result'        => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->clear() : FALSE,
                'commit'        => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->commit() : NULL,
                'getDriverName' => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->getDriverName() : NULL,
                'getStats'      => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->getStats() : NULL,
                'getConfig'     => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->getConfig() : NULL,
            ];
            $this->debug->debug(__FUNCTION__, 'Clear Cache from Handler: ' . json_encode($this->cacheHandle) . ' -> Result: ' . json_encode($result));

            return $result;
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }
    }
66936
public static function getInstance()
    {
        if (null === self::$_instance) {
        
            $app = \Cetera\Application::getInstance();
        
            if ($app->getVar('cache_memcache')!='off' && $app->getVar('cache_memcache')!='disable' && $app->getVar('cache_memcache')!='0' && self::isMemcacheAvailable()) {
				$o = [];
				if ( $app->getVar('memcache_server') ) {
					$o['servers'] = $app->getVar('memcache_server');
				}
                $backend = new \Dklab_Cache_Backend_TagEmuWrapper(new \Zend_Cache_Backend_Memcached($o));
			}
            elseif ($app->getVar('cache_memcached')!='off'&& $app->getVar('cache_memcached')!='disable' && $app->getVar('cache_memcached')!='0' && self::isMemcachedAvailable()) {
				$o = [];
				if ( $app->getVar('memcached_server') ) {
					$o['servers'] = $app->getVar('memcached_server');
				}				
                $backend = new \Dklab_Cache_Backend_TagEmuWrapper(new \Zend_Cache_Backend_Libmemcached($o));				
            } 
			elseif ($app->getVar('cache_file') && self::isFilecacheAvailable()) {
                $backend = new \Zend_Cache_Backend_File(array('cache_dir'=>FILECACHE_DIR, 'hashed_directory_level'=>1));
            } 
			else {
                $backend = new BackendNull();
            }
        
            self::$_instance = new Profiler($backend);
        }
        return self::$_instance;
    }
22924
public function getCached()
    {
        $cached = $this->cache->get(
            $this->getCacheKey(),
            []
        );

        return $this->formatCache($cached);
    }
1017165
protected function _getCatCache()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        // first look at the local cache
        $aLocalCatCache = $myConfig->getGlobalParameter('aLocalCatCache');

        // if local cache is not set - loading from file cache
        if (!$aLocalCatCache) {
            $sLocalCatCache = \OxidEsales\Eshop\Core\Registry::getUtils()->fromFileCache('aLocalCatCache');
            if ($sLocalCatCache) {
                $aLocalCatCache = $sLocalCatCache;
            } else {
                $aLocalCatCache = null;
            }
            $myConfig->setGlobalParameter('aLocalCatCache', $aLocalCatCache);
        }

        return $aLocalCatCache;
    }
951496
public function getCache()
    {
        if (null === $this->cache) {
            if (isset($this->options['cache']) && is_string($this->options['cache'])) {
                $this->cache = $this->container->get($this->options['cache']);
            }
        }
        
        return $this->cache;
    }
205629
public function getFullDataSet () : array
    {
        if ($this->isUsingHandler()) :
            $this->regularize();
            $this->clearCache();

            return $this->_Cache = $this->_DataHandler->selectRangeEntitys(0,$this->_maxKey + 1);
        else :
            return $this->_Container;
        endif;
    }
194359
public static function Regen( $less_files, $parser_options = array(), $modify_vars = array() ){
		$parser_options['use_cache'] = false;
		return self::Get( $less_files, $parser_options, $modify_vars );
	}
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;
    }
35251
public function getInfo()
    {
        return array(
            'ucache_meminfo' => wincache_ucache_meminfo(),
            'ucache_info' =>    wincache_ucache_info(),
            'session_cache_info' => wincache_scache_info(),
            'session_cache_meminfo' =>  wincache_scache_meminfo(),
            'rp_meminfo' => wincache_rplist_meminfo(),
            'rp_fileinfo' =>    wincache_rplist_fileinfo(),
            'opcode_fileinfo' =>    wincache_ocache_fileinfo(),
            'opcode_meminfo' => wincache_ocache_meminfo(),
            'filecache_meminfo' =>  wincache_fcache_fileinfo(),
            'filecache_fileinfo' => wincache_fcache_meminfo()
        );
    }
1076004
public static function getCachedMethods(): array
    {
        return [
            'getTypePrefix' => true,
            'getType' => true,
            'getFlexDirectory' => true,
            'getCacheKey' => true,
            'getCacheChecksum' => true,
            'getTimestamp' => true,
            'hasProperty' => true,
            'getProperty' => true,
            'hasNestedProperty' => true,
            'getNestedProperty' => true,
            'orderBy' => true,

            'render' => false,
            'isAuthorized' => 'session',
            'search' => true,
            'sort' => true,
        ];
    }
46860
protected function getPhpSettings()
    {
        $accelerators = '';

        if (function_exists('apc_store')) {
            if (ini_get('apc.enabled')) {
                $accelerators = 'APC';
            } else {
                $accelerators = 'APC (disabled)';
            }
        }

        if (function_exists('apcu_store')) {
            if (ini_get('apc.enabled')) {
                $accelerators = 'APCu';
            } else {
                $accelerators = 'APCu (disabled)';
            }
        }

        if (extension_loaded('wincache') and ini_get('wincache.ocenabled')) {
            if (!empty($accelerators)) {
                $accelerators .= ', ';
            }

            $accelerators .= 'Wincache (opcache)';
        }

        if (extension_loaded('wincache') and ini_get('wincache.ucenabled')) {
            if (!empty($accelerators)) {
                $accelerators .= ', ';
            }

            $accelerators .= 'Wincache (usercache)';
        }

        if (function_exists('xcache_set') and (int) ini_get('xcache.var_size') > 0) {
            if (!empty($accelerators)) {
                $accelerators .= ', ';
            }

            $accelerators .= 'xcache';
        }

        if (extension_loaded('Zend OPcache') and ini_get('opcache.enable')) {
            if (!empty($accelerators)) {
                $accelerators .= ', ';
            }

            $accelerators .= 'Zend OPcache';
        }

        $data = [];
        $data[] = [
            'title' => 'PHP Version',
            'value' => phpversion().' ('.php_uname('m').')',
            'required' => '7.1.0',
            'recomended' => '7.1.6+',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'PHP Accelerators',
            'value' => $accelerators,
            'required' => '',
            'recomended' => 'APCu, Zend OPcache, Wincache',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Memory Limit',
            'value' => ini_get('memory_limit'),
            'required' => '128M',
            'recomended' => '256M',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Safe Mode',
            'value' => ini_get('safe_mode') ? 'On' : 'Off',
            'required' => 'Off',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Display Errors',
            'value' => ini_get('display_errors') ? 'On' : 'Off',
            'required' => 'Off',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Magic Quotes',
            'value' => ini_get('magic_quotes_gpc') ? 'On' : 'Off',
            'required' => 'Off',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Register Globals',
            'value' => ini_get('register_globals') ? 'On' : 'Off',
            'required' => 'Off',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Output Buffering',
            'value' => ((bool)ini_get('output_buffering')) ? 'On' : 'Off',
            'required' => 'On',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Mbstring Enabled',
            'value' => extension_loaded('mbstring') ? 'Yes' : 'No',
            'required' => 'Yes',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Upload max filesize',
            'value' => ini_get('upload_max_filesize'),
            'required' => '4M',
            'recomended' => '20M',
            'hint' => '',
            'warning' => 0,
        ];
        $data[] = [
            'title' => 'Server time',
            'value' => (new \DateTime())->format('Y-m-d H:i:s').' ('.ini_get('date.timezone').')',
            'required' => '',
            'recomended' => '',
            'hint' => '',
            'warning' => 0,
        ];

        return $data;
    }
284609
public function getCaches()
    {
        if (!$this->caches) {
            foreach (Cache::getBins() as $name => $bin) {
                $this->caches[$name] = $bin;
            }
        }

        return $this->caches;
    }