So I have installed xVarnish or, CacheWall, but the Cache-control max_age is set to 0. I found this post here but I am not sure of the exact location that I can implement the answers suggestion of

"You are just missing session_cache_limiter and session_cache_expire, which should be the first lines executed on the requested PHP script, even before session_start()."

The same person edited their answer to also give the added option of modifying Apache mod_expires which I tried to do with this tutorial here which threw an error of wrong syntax when I tried to restart my apache2 server.

Is there a tutorial some one could point me too? or some direction on modifying the session_start in magento?

Sorry if this has been asked before and for my noobness. The url I am trying this on is www.brotomic.com the headers contain

 [root@host ~]# curl -I http://www.brotomic.com
HTTP/1.1 302 Found
Date: Thu, 17 Aug 2017 18:14:15 GMT
Pragma: no-cache
Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Expires: Wed, 17 Aug 2016 18:14:15 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: PHPSESSID=o3h5m3r4ei5o3628ij49940u62; expires=Thu, 17-Aug-2017 19:14:15 GMT; Max-Age=3600; path=/; domain=www.brotomic.com; HttpOnly
Location: http://brotomic.com/?SID=o3h5m3r4ei5o3628ij49940u62
X-UA-Compatible: IE=edge
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Varnish: 229728
Age: 0
X-Cache: MISS
Connection: keep-alive

We are running on a dedicated server and also with centOS/cpanel. Also would a VCL file change be appropriate for this?


  • The page you are visiting might be uncacheable devdocs.magento.com/guides/v2.1/config-guide/cache/… – mbalparda Aug 17 '17 at 18:48
  • From the link and documentation the only the checkout pages should be uncacheable not the home page or product pages.? – neurosis Aug 17 '17 at 19:42
  • It might be caused by a third party module. – mbalparda Aug 17 '17 at 19:46
  • are you talking about a module on the backend? What would I be looking for ? – neurosis Aug 18 '17 at 19:20
  • Start by searching cacheable="false" in your xmls and see which ones are in use. – mbalparda Aug 18 '17 at 22:09

I was able to find the session_cache_limiter and session_cache_expire through the WHM dashboard in MultiPHP INI Editor which allowed me to change the settings of these 2 features which changed my header and allowed Varnish to be be enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.