PHP code example of alengo / sulu-http-cache-bundle
1. Go to this page and download the library: Download alengo/sulu-http-cache-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alengo / sulu-http-cache-bundle example snippets
// config/bundles.php
Alengo\SuluHttpCacheBundle\AlengoHttpCacheBundle::class => ['all' => true],
use Alengo\SuluHttpCacheBundle\Cache\CacheKernelConfigurator;
public function getHttpCache(): HttpKernelInterface
{
if (!$this->httpCache instanceof HttpKernelInterface) {
$cache = new SuluHttpCache($this);
(new CacheKernelConfigurator())->configure(
$cache->getEventDispatcher(),
$this->getProjectDir(),
$this->getEnvironment(),
);
$this->httpCache = $cache;
}
return $this->httpCache;
}