WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Varnish
Most pages aren't caching (5 posts)

  1. stevied
    Member
    Posted 1 year ago #

    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/

  2. stevied
    Member
    Posted 1 year ago #

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

    Set-Cookie: PHPSESSID=d6413d0d52f0c9a195933859b57da2b8; path=/

  3. Pothi
    Member
    Posted 1 year ago #

    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.

  4. stevied
    Member
    Posted 1 year ago #

    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?

  5. Pothi
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.