@param string $cacheFolder

@return $this
515143
public function setCacheFolder(?string $cacheFolder)
	{
		if (substr($cacheFolder, -1) !== '/') {
			$cacheFolder .= "/";
		}
		$this->cacheFolder = $cacheFolder;
		$this->initCache();
		return $this;
	}
727106
public function setCachePath($cachePath)
    {
        if (empty($cachePath) || !is_writable($cachePath)) {
            throw new PageCacheException(__METHOD__.' - Cache path not writable: '.$cachePath);
        }
        if (substr($cachePath, -1) !== '/') {
            throw new PageCacheException(__METHOD__.' - / trailing slash is expected at the end of cache_path.');
        }
        $this->cachePath = $cachePath;
        return $this;
    }
1170731
public function warmUp($cacheDir)
    {
        foreach ($this->driver->getAllClassNames() as $className) {
            $this->driver->parse(new \ReflectionClass($className));
        }
    }
966932
public function clear($cacheDir)
    {
        $fs = new Filesystem();
        $proxyCacheDir = $cacheDir.'/kitpages_proxy';
        if ($fs->exists($proxyCacheDir)) {
            die('here');
            $fs->remove($proxyCacheDir);
        }
    }
487176
public function setCacheFile(string $cacheFile) : Router
    {
        if ($cacheFile == '') {
            $this->cacheFile = false;

            return $this;
        }

        $spl    = new \SplFileInfo($cacheFile);
        $splDir = $spl->getPathInfo();
        if (! $splDir->isWritable()) {
            throw new \RuntimeException(
                'Cache file directory is not writable',
                E_WARNING
            );
        }
        if ($spl->getRealPath() && ! $spl->isFile()) {
            throw new \RuntimeException(
                sprintf(
                    'Cache file is not a file %s given',
                    $spl->getType()
                ),
                E_WARNING
            );
        }

        if (! $spl->getRealPath()) {
            $spl = new \SplFileInfo($splDir->getRealPath() . DIRECTORY_SEPARATOR . $spl->getBasename());
        }

        $this->cacheFile = $spl->__toString();
        unset($spl, $splDir);

        return $this;
    }
988709
public function setCachePath($cachePath = NULL)
    {
        $this->cachePath = $cachePath;
        $this->debug->debug(__FUNCTION__, 'setCachePath: ', $this->cachePath);
    }
95166
public function prune($dealerFolder = null)
    {
        if ($dealerFolder) {
            $this->addUsingAlias(DealerFolderTableMap::ID, $dealerFolder->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
150251
public function getCacheDir()
	{
		if ($this->cacheDir === null) {
			$this->setCacheDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);
		}

		return $this->cacheDir;
	}
1012377
public function setCachePath(string $cachePath)
    {
        $this->cachePath = $cachePath;
        if (!is_dir($this->cachePath)) {
            FileHelper::createDirectory($this->cachePath, $this->dirMode, true);
        }
    }
624392
public function warmUp($cacheDir)
    {
        $dir = $cacheDir.'/victoire/Entity';
        $file = $dir.'/EntityProxy.php';

        if (!file_exists($dir)) {
            if (false === @mkdir($dir, 0777, true)) {
                throw new \RuntimeException(sprintf('Could not create directory "%s".', $dir));
            }
        }

        $generator = new EntityProxyGenerator($this->businessEntityHelper, $this->fileLocator);
        $cacheContent = $generator->generate();

        $this->writeCacheFile($file, $cacheContent);
        if (!class_exists('Victoire\\Bundle\\CoreBundle\\Entity\\EntityProxy')) {
            include_once $file;
        }
    }
1251714
public function setCaching($caching) {
        if(is_object($caching)) {
            $this->cacheObj = $caching;
            $this->cacheEnabled = true;
        }
        return $this;
    }
812914
public function setCache($cache, $namespace = null)
    {
        if($cache && ClassRegistryCache::isSupported())
        {
            $this->__registry = new ClassRegistryCache();

            if($namespace) {
                $this->__registry->setNamespace($namespace);
            }
        }
        else
        {
            if(!$this->__registry instanceof ClassRegistry) {
                $this->__registry = new ClassRegistry();
            }
        }

        return $this;
    }
918176
public static function configureCache($cacheDriver)
    {
        $cache = null;

        switch (strtolower($cacheDriver['type'])) {
            case 'apc':
                $cache = new \Doctrine\Common\Cache\ApcCache();
                break;

            case 'xcache':
                $cache = new \Doctrine\Common\Cache\XcacheCache();
                break;

            case 'memcache':
                $cache = self::configureMemcacheCache($cacheDriver['host'], $cacheDriver['port']);
                break;

            case 'redis':
                $cache = self::configureRedisCache($cacheDriver['host'], $cacheDriver['port']);
                break;

            case 'array':
                $cache = new \Doctrine\Common\Cache\ArrayCache();
                break;
        }

        return $cache;
    }
1063899
public function setCacheDirectory($directory)
    {
        if (!is_dir($directory)) {
            $this->createDirectory($directory);
        }

        if (!is_writable($directory)) {
            throw new \InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
        }

        $this->cacheDirectory = $directory;

        return $this;
    }
86708
public function setCache($cache) : self
    {
        if (is_string($cache)) {
            $this->cache = CacheFactory::make($cache);
        } elseif ($cache instanceof Cacheable) {
            $this->cache = $cache;
        }

        $prefix = 'tus:' . strtolower((new \ReflectionClass(static::class))->getShortName()) . ':';

        $this->cache->setPrefix($prefix);

        return $this;
    }
853228
public function add($cacheId, Cacheable $cacheable)
    {
        $this->cachedItems[$cacheId] = (object) [
            'cacheable' => $cacheable,
            'expiry' => $this->timeUtil->expiry($cacheable->ttl())
        ];
        return $this;
    }
745311
public function setCachePath($cachePath='')
    {
        if ($this->cache) {
            if (empty($cachePath)) {
                $this->cachePath = $this->templatesPath.'cache/';
            } else {
                $this->cachePath = $cachePath;
            }
            if (!is_readable($this->cachePath) || !is_writeable($this->cachePath)) {
                $this->error("Template Cache Path ({$this->cachePath}) does not exist or is not readable & writeable.");
            }
        } else {
            $this->cachePath = null;
        }
    }