• Resolved Kubra

    (@kubbas)


    I’ve WP 4.7 and AS Version 3.3.4 installed on DreamHost (DreamPress), which uses Varnish for caching. When Awesome Support is enabled it prevents Varnish from caching the whole site.

    According to DreamHost:

    Varnish is not able to cache the site due to a script or plugin setting no-cache headers on your site. It is setting no-cache rules or max-age limits set to 0.

    Set-Cookie:
    _wpas_session=30a6a8e16cdc68b8bf5d94a7f7735aa4%7C%7C1482100871%7C%7C1482100511;
    expires=Sun, 18-Dec-2016 22:41:11 GMT; Max-Age=1800; path=/
    Cache-Control: max-age=0
    Expires: Sun, 18 Dec 2016 22:11:11 GMT
    X-Cacheable: NO:Not Cacheable
    Accept-Ranges: bytes
    X-Varnish: 1787780833
    Age: 0
    Via: 1.1 varnish

    I do have to have Varnish to cache the site.
    Is anyone else having a similar issue?
    Is there a way to fix this?

    Thank you!

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author awesomesupport

    (@awesomesupport)

    AS doesn’t set any specific headers. Is it possible that something else is setting these headers?

    Thread Starter Kubra

    (@kubbas)

    I inactivated all plugins and activated one by one and it only failed when Awesome Support plugin was active. If I inactivate Awesome Support, Varnish starts caching. I can see it on the Varnish status test page. As soon as I enable Awesome Support plugin, Varnish Status page tells me it’s unable to cache. It doesn’t make sense why Awesome Support would affect it.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s this:

    _wpas_session=30a6a8e16cdc68b8bf5d94a7f7735aa4%7C%7C1482100871%7C%7C1482100511;

    If that cookie is set on every page load for every user, logged in or not, then Varnish won’t cache. Non-standard WP cookies are an indication that a user requires a unique experience with the site, and that cached data would be bad.

    Looks like it’s set in class WPAS_Session. Is that meant to run for all users all the time? Even if non-logged-in users need to create a ticket, the sessions only have to be set on the ticket page. If only logged in users can access the ticket system, then you could safely restrict cookie creation to if a user is logged in.

    Cookies (and sessions) are things best served up ONLY when a user needs a unique experience on every single page load. They tend to (rightly) bust caches.

    Thread Starter Kubra

    (@kubbas)

    It should only run for logged in users only and on the ticket related pages. At the moment, it’s executing for every page and non-logged in users.

    • This reply was modified 7 years, 11 months ago by Kubra.
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Does it set a cookie for non-logged in users on ticket pages? If so, that will stick around once it’s set, but it shouldn’t be on the main page on first load.

    Thread Starter Kubra

    (@kubbas)

    I actually don’t know. I’m pretty new to WP. I assumed it’s loading on the homepage because when I was testing the page speed via pingdom and it showed me a call to AS and its cache session for the homepage.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    While you can detect it from your browser, if you’re using https://www.ads-software.com/plugins/varnish-http-purge/ (which if you’re on DreamPress, we install it for you as the default Varnish/WP communicator), there’s a tool for you ??

    From your WordPress Dashboard, go to Tools -> Varnish Status. There a page will auto-scan your main plugin page and report back any issues found. This includes any known problematic plugins. You can change it to scan any URL on your domain, though it’ll complain at you if you try ones outside your domain.

    Thread Starter Kubra

    (@kubbas)

    Thank you, Mika!
    It’s on DreamPress. That’s how I realized and with the help of DreamHost support, that Awesome Support is preventing Varnish to cache the site.

    Thread Starter Kubra

    (@kubbas)

    Hi Awesome Support,

    Is there a way to get around the compatibility issue with Varnish? I’d like to use AS with its extensions.

    Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    Sorry for the late reply – I was trying to get some research done on the issue. After checking in with a couple of devs we’ve confirmed that it is an issue. Given that you don’t have any control over the varnish configuration we’re trying to find a work around. We’re not the only one to encounter this issue with this library but it’s a better solution with less conflict than using PHP Sessions (though, of course, I understand that this is of no comfort to you since you’re encountering the issue.)

    We’re doing some research on this and will try to find and implement a solution. The timeline at this point is unknown – any fix is going to have to be carefully vetted before being released so its not going to be a fast/quick one.

    Thread Starter Kubra

    (@kubbas)

    Thank you so much!
    Looking forward to seeing future enhancements with AS. I’ve tried a few other support plugins and this is by far the best one with the new addons you guys keep adding.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    If you need a DreamPress site to test on, please drop me an email at [email protected] and I can set one up for you ??

    Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    We’ve released a beta version of the plugin that only loads the sessions on plugin pages. Can someone test and see if this fixes the issue with varnish?

    You can download the beta from this page: Download 3.4.0 Beta Page

    Thanks!

    Thread Starter Kubra

    (@kubbas)

    Thank you for such a quick response!
    I actually end up rolling back to shared hosting from DreamPress. I needed to use AS and I didn’t know when the fix would be available and I didn’t need the DreamPress right away. So I can’t really test it. However, I’d test it if I can get a test account with DreamPress. I’ll email Mika and see how it goes.

    Plugin Author awesomesupport

    (@awesomesupport)

    @kubra – hold off on that. We’ve found an issue on the change. We have to go back to the drawing board on it. Gah – was hoping it was going to be easier than we thought. It’s not.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Conflict with Varnish Cache’ is closed to new replies.