Support » Plugin: WordPress Varnish » Most pages aren't caching

  • stevied

    (@stevied)


    Most pages are sending back the following headers:

    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache

    As a result, varnish is never caching them, making varnish basically useless.

    Anything I can do?

    http://wordpress.org/extend/plugins/wordpress-varnish/

Viewing 4 replies - 1 through 4 (of 4 total)
  • stevied

    (@stevied)

    I just noticed that WordPress is trying to set a cookie, too:

    Set-Cookie: PHPSESSID=d6413d0d52f0c9a195933859b57da2b8; path=/

    You can fix the code that sends those headers or you can still force Varnish to cache, irrespective of those headers and cookie, by setting beresp.ttl in vcl_fetch.

    stevied

    (@stevied)

    Is it a good idea to do that, though?

    Also, this is happening on one WordPress site but not another. What can explain this?

    And when I did a grep on “PHPSESSID” nothing came back except a module that I deactivated. What the heck is setting that cookie?

    Is it a good idea to do that, though?

    Depends on the site.

    Also, this is happening on one WordPress site but not another. What can explain this?

    And when I did a grep on “PHPSESSID” nothing came back except a module that I deactivated. What the heck is setting that cookie?

    You may want to deactivate all the plugins and switch to a default theme. From there, you may activate one at a time to see what creates the cookie and the headers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Most pages aren't caching’ is closed to new replies.