From 16af55ae77e0369fed9eb4f979efb674c40f46ff Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Sat, 5 Oct 2013 11:52:13 +0200 Subject: [PATCH] start using symfony 2 reverse proxy --- .../Core/HttpKernel/HttpCache/HttpCache.php | 52 +++++++++++++++++++ core/lib/Thelia/Core/Thelia.php | 1 + web/index.php | 3 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 core/lib/Thelia/Core/HttpKernel/HttpCache/HttpCache.php diff --git a/core/lib/Thelia/Core/HttpKernel/HttpCache/HttpCache.php b/core/lib/Thelia/Core/HttpKernel/HttpCache/HttpCache.php new file mode 100644 index 000000000..01ad22733 --- /dev/null +++ b/core/lib/Thelia/Core/HttpKernel/HttpCache/HttpCache.php @@ -0,0 +1,52 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\HttpKernel\HttpCache; + +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpKernel\HttpCache\HttpCache as BaseHttpCache; +use Symfony\Component\HttpKernel\HttpCache\Store; +use Symfony\Component\HttpKernel\HttpKernelInterface; + +/** + * Class HttpCache + * @package Thelia\Core\HttpKernel\HttpCache + * @author manuel raynaud + */ +class HttpCache extends BaseHttpCache +{ + + public function __construct(HttpKernelInterface $kernel, $options = array()) + { + parent::__construct( + $kernel, + new Store($kernel->getCacheDir().'/http_cache'), + new Esi(), + array_merge( + array('debug' => $kernel->isDebug()), + $options + ) + ); + } + +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php index 49647f4c9..a251e2ad6 100755 --- a/core/lib/Thelia/Core/Thelia.php +++ b/core/lib/Thelia/Core/Thelia.php @@ -67,6 +67,7 @@ class Thelia extends Kernel if ($this->debug) { ini_set('display_errors', 1); } + ini_set('display_errors', 1); $this->initPropel(); } diff --git a/web/index.php b/web/index.php index 4d50cc633..378bf1430 100755 --- a/web/index.php +++ b/web/index.php @@ -1,4 +1,5 @@ handle($request)->prepare($request)->send(); $thelia->terminate($request, $response);