return pointer to the search cache object.

@return TdbShopSearchCache
337541
public function &GetActiveSearchObject()
    {
        if (is_null($this->oActiveSearchCache) && array_key_exists(self::SESSION_ACTIVE_SEARCH_CACHE_ID, $_SESSION)) {
            $this->oActiveSearchCache = unserialize(base64_decode($_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID]));
            //        $this->oActiveSearchCache = TdbShopSearchCache::GetNewInstance();
            //        if (!$this->oActiveSearchCache->Load($_SESSION[self::SESSION_ACTIVE_SEARCH_CACHE_ID])) $this->oActiveSearchCache = null;
        }

        return $this->oActiveSearchCache;
    }
1279022
public function getCacheService()
    {
        $memcached = $this->memcached;
        if (empty($memcached)) {
            /**
             * @var \Zend\Cache\Storage\Adapter\Memcached $memcached
             */
            $memcached = $this->getServiceLocator()->get('memcached');
        }

        return $memcached;
    }
1254796
private function getTableCache()
	{
		return $this->getCache()->load($this->getTableName(), function (&$dependencies) {
			return parent::getAllItems($this->assocBy);
		});
	}
1152051
public function getCacheStore(): ?Store
    {
        if (!$this->hasCacheStore()) {
            $this->setCacheStore($this->getDefaultCacheStore());
        }
        return $this->cacheStore;
    }
641053
public function getResultCache() {
    if (!isset($this->resultCache)) 
      $this->resultCache = new \Doctrine\Common\Cache\ArrayCache;
      
    return $this->resultCache;
  }
943151
public function search(ODataQuerySearch $search = NULL) {
        if (isset($search)) {
            $this->setSearch($search);
            return $this;
        }
        return $this->getSearch();
    }
599270
protected function buildSearchableFieldCache() {
		if (!$this->searchableCache) {
			$objects = DataObject::get('SolrTypeConfiguration');
			if ($objects) {
				foreach ($objects as $obj) {
					$this->searchableCache[$obj->Title] = $obj->FieldMappings->getValues();
				}
			}
		}
		return $this->searchableCache;
	}
1222258
public function getCache()
    {
        if (!$this->cache) {
            $this->cache = new CacheStorageHelper(
                CacheStorageHelper::ADAPTOR_DATABASE,
                'Health',
                $this->em->getConnection()
            );
        }

        return [
            'delays'     => $this->cache->get('delays'),
            'lastCached' => $this->cache->get('lastCached'),
        ];
    }
746740
public function getCacheDir()
    {
        static $dir;
        if (empty($dir)) {
            $dir = $this->getOpenDir() . '/cache/';

            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
        }
        return $dir;
    }
413325
public function getProjectsAndCacheResult()
    {
        $projects = $this->getProjects();

        app('tddd.cache')->put(Constants::CACHE_PROJECTS_KEY, sha1($projects->toJson()));

        return $projects;
    }
844702
public function search()
    {
        $pattern = $this->request->getQuery('p');

        //Checks if the pattern is at least 4 characters long
        if ($pattern && strlen($pattern) < 4) {
            $this->Flash->alert(__d('me_cms', 'You have to search at least a word of {0} characters', 4));

            return $this->redirect(['action' => $this->request->getParam('action')]);
        }

        //Checks the last search
        if ($pattern && !$this->checkLastSearch($pattern)) {
            $this->Flash->alert(__d(
                'me_cms',
                'You have to wait {0} seconds to perform a new search',
                getConfigOrFail('security.search_interval')
            ));

            return $this->redirect(['action' => $this->request->getParam('action')]);
        }

        if ($pattern) {
            $this->paginate['limit'] = getConfigOrFail('default.records_for_searches');

            $page = $this->request->getQuery('page', 1);

            //Sets the cache name
            $cache = sprintf('search_%s_limit_%s_page_%s', md5($pattern), $this->paginate['limit'], $page);

            //Tries to get data from the cache
            list($posts, $paging) = array_values(Cache::readMany(
                [$cache, sprintf('%s_paging', $cache)],
                $this->Posts->getCacheName()
            ));

            //If the data are not available from the cache
            if (empty($posts) || empty($paging)) {
                $query = $this->Posts->find('active')
                    ->select(['title', 'slug', 'text', 'created'])
                    ->where(['OR' => [
                        'title LIKE' => sprintf('%%%s%%', $pattern),
                        'subtitle LIKE' => sprintf('%%%s%%', $pattern),
                        'text LIKE' => sprintf('%%%s%%', $pattern),
                    ]])
                    ->order([sprintf('%s.created', $this->Posts->getAlias()) => 'DESC']);

                $posts = $this->paginate($query);

                //Writes on cache
                Cache::writeMany([
                    $cache => $posts,
                    sprintf('%s_paging', $cache) => $this->request->getParam('paging'),
                ], $this->Posts->getCacheName());
            //Else, sets the paging parameter
            } else {
                $this->request = $this->request->withParam('paging', $paging);
            }

            $this->set(compact('posts'));
        }

        $this->set(compact('pattern'));
    }
1082424
protected function getCacheDir()
    {
        $cacheDir = $this->container->getParameter("kernel.cache_dir");
        $cacheDir = rtrim($cacheDir, '/');
        $cacheDir .= '/' . self::SITEMAP_CACHE_DIR . '/';

        return $cacheDir;
    }
798871
public function _GetCacheParameters()
    {
        $aParameters = parent::_GetCacheParameters();

        $oShop = TdbShop::GetInstance();
        $oActiveCategory = $oShop->GetActiveCategory();
        $oActiveItem = $oShop->GetActiveItem();

        if (!is_null($oActiveCategory)) {
            $aParameters['activecategoryid'] = $oActiveCategory->id;
        }
        if (!is_null($oActiveItem)) {
            $aParameters['activeitemid'] = $oActiveItem->id;
        }

        return $aParameters;
    }
1136396
protected function checkCache() {
		if( isset(static::$instances[static::getClass()][$this->id()]) ) {
			return static::$instances[static::getClass()][$this->id()];
		}
		static::$instances[static::getClass()][$this->id()] = $this;
		return $this;
	}
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;
    }
956159
public function getPageCache()
    {
        $key = $this->getCurrentKey();
        $item = $this->getItemStorage()->get($key);

        return $item ? $item->getContent() : false;
    }
344783
private function getCache()
    {
        $cachePath = $this->getCachePath();

        if (!$this->files->exists($cachePath)) {
            $this->createCache();

            $this->optimize();
        }

        return collect(json_decode($this->files->get($cachePath), true));
    }