diff --git a/core/lib/Thelia/Core/EventListener/ViewListener.php b/core/lib/Thelia/Core/EventListener/ViewListener.php
index 4bdfd2195..4b1d3343a 100755
--- a/core/lib/Thelia/Core/EventListener/ViewListener.php
+++ b/core/lib/Thelia/Core/EventListener/ViewListener.php
@@ -90,13 +90,13 @@ class ViewListener implements EventSubscriberInterface
$response = new Response($content, $parser->getStatus() ?: 200);
}
-/* $response->setCache(array(
+ $response->setCache(array(
'last_modified' => new \DateTime(),
'max_age' => 600,
's_maxage' => 600,
'private' => false,
'public' => true,
- ));*/
+ ));
$event->setResponse($response);
} catch (ResourceNotFoundException $e) {
diff --git a/core/lib/Thelia/Core/Thelia.php b/core/lib/Thelia/Core/Thelia.php
index a251e2ad6..49647f4c9 100755
--- a/core/lib/Thelia/Core/Thelia.php
+++ b/core/lib/Thelia/Core/Thelia.php
@@ -67,7 +67,6 @@ class Thelia extends Kernel
if ($this->debug) {
ini_set('display_errors', 1);
}
- ini_set('display_errors', 1);
$this->initPropel();
}
diff --git a/local/modules/Front/Config/front.xml b/local/modules/Front/Config/front.xml
index 94234aa20..f3a384250 100755
--- a/local/modules/Front/Config/front.xml
+++ b/local/modules/Front/Config/front.xml
@@ -13,6 +13,11 @@
includes/addedToCart
+
+ Front\Controller\CartController::renderMiniCart
+ includes/mini-cart
+
+
diff --git a/local/modules/Front/Controller/CartController.php b/local/modules/Front/Controller/CartController.php
index d3d24c3bd..9557eab52 100755
--- a/local/modules/Front/Controller/CartController.php
+++ b/local/modules/Front/Controller/CartController.php
@@ -142,4 +142,10 @@ class CartController extends BaseFrontController
return $cartAdd;
}
+ public function renderMiniCart()
+ {
+ $response = $this->render('includes/mini-cart');
+ return $response;
+ }
+
}
diff --git a/templates/frontOffice/default/layout.tpl b/templates/frontOffice/default/layout.tpl
index d8433e848..c4db8e8ab 100644
--- a/templates/frontOffice/default/layout.tpl
+++ b/templates/frontOffice/default/layout.tpl
@@ -129,7 +129,7 @@ GNU General Public License : http://www.gnu.org/licenses/
{/elseloop}
- {include file="includes/mini-cart.html" nocache}
+
{/nocache}
diff --git a/web/index.php b/web/index.php
index 378bf1430..54ccee7a4 100755
--- a/web/index.php
+++ b/web/index.php
@@ -11,7 +11,7 @@ require __DIR__ . '/../core/bootstrap.php';
$request = Request::createFromGlobals();
$thelia = new Thelia("prod", false);
-//$thelia = new HttpCache($thelia);
+$thelia = new HttpCache($thelia);
$response = $thelia->handle($request)->prepare($request)->send();
$thelia->terminate($request, $response);
diff --git a/web/index_dev.php b/web/index_dev.php
index 2ac651a5a..fc0e4e7af 100755
--- a/web/index_dev.php
+++ b/web/index_dev.php
@@ -44,9 +44,8 @@ if ( false === in_array($request->getClientIp(), $trustedIp)) {
$response = Response::create('Forbidden', 403)->send();
$thelia->terminate($request, $response);
} else {
- $thelia = new HttpCache($thelia);
$response = $thelia->handle($request)->send();
- //$thelia->terminate($request, $response);
+ $thelia->terminate($request, $response);
}