Commit a8015661 authored by Tino Goratsch's avatar Tino Goratsch

replace the cache storage of the HTTP cache with the `toflar/psr6-symfony-http-cache-store` package

parent 440c9021
......@@ -13,6 +13,7 @@ use FOS\HttpCache\SymfonyCache\CacheInvalidation;
use FOS\HttpCache\SymfonyCache\DebugListener;
use FOS\HttpCache\SymfonyCache\EventDispatchingHttpCache;
use FOS\HttpCache\SymfonyCache\PurgeListener;
use FOS\HttpCache\SymfonyCache\PurgeTagsListener;
use FOS\HttpCache\SymfonyCache\RefreshListener;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpCache\HttpCache;
......@@ -44,6 +45,7 @@ class BootstrapCache extends HttpCache implements CacheInvalidation
'session_name_prefix' => SessionHandlerInterface::SESSION_NAME
]));
$this->addSubscriber(new PurgeListener());
$this->addSubscriber(new PurgeTagsListener());
$this->addSubscriber(new RefreshListener());
$this->addSubscriber(new StaticAssetsListener());
if (isset($options['debug']) && $options['debug']) {
......
This diff is collapsed.
......@@ -5,6 +5,8 @@
* @author Tino Goratsch
*/
use Toflar\Psr6HttpCacheStore\Psr6Store;
define('ACP3_ROOT_DIR', realpath(__DIR__) . '/');
require ACP3_ROOT_DIR . 'vendor/autoload.php';
......@@ -27,9 +29,9 @@ HTML;
exit;
}
$cacheStore = new \Symfony\Component\HttpKernel\HttpCache\Store(
$kernel->getAppPath()->getCacheDir() . 'http/'
);
$cacheStore = new Psr6Store([
'cache_directory' => $kernel->getAppPath()->getCacheDir() . 'http/'
]);
$appCache = new \ACP3\Core\Application\BootstrapCache(
$kernel,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment