Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[FrameworkBundle] made http_cache dir extensible

  • Loading branch information...
commit 2b8c2bc9c38ba1abbb43e70228de8ca83ecc425f 1 parent 1bb6e0d
@kbond kbond authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
View
12 src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
@@ -28,11 +28,17 @@
/**
* Constructor.
*
- * @param HttpKernelInterface $kernel An HttpKernelInterface instance
+ * @param HttpKernelInterface $kernel An HttpKernelInterface instance
+ * @param String $cacheDir The cache directory (default used if null)
*/
- public function __construct(HttpKernelInterface $kernel)
+ public function __construct(HttpKernelInterface $kernel, $cacheDir = null)
{
- $store = new Store($kernel->getCacheDir().'/http_cache');
+ if ($cacheDir) {
+ $store = new Store($cacheDir);
+ } else {
+ $store = new Store($kernel->getCacheDir().'/http_cache');
+ }
+
$esi = new Esi();
parent::__construct($kernel, $store, $esi, array_merge(array('debug' => $kernel->isDebug()), $this->getOptions()));
Please sign in to comment.
Something went wrong with that request. Please try again.