Support » Plugin: Proxy Cache Purge » Caching problems with Autoptimize

  • Resolved sarangsss29

    (@sarangsss29)


    Hi, The Autoptimize plugin Conflicts with varnish Caching, throws an error unexpected behavior in caching on Dreampress servers. How do I fix this?

    The Varnish HTTP cache plugin has unexpected results with caching, making not function properly.

    Though caching may be working, it is not giving optimal results. Can you fix it?

    Here is the output given by the Varnish HTTPS cache.

    This plugin has unexpected results with caching, making not function properly.

    Technical Details
    date: Wed, 30 May 2018 06:23:03 GMT
    content-type: text/html; charset=UTF-8
    set-cookie: __cfduid=da15290eb8a5df04b24023f936d44242d1527661383; expires=Thu, 30-May-19 06:23:03 GMT; path=/; domain=.androidsage.com; HttpOnly
    x-cache-handler: php
    x-cacheable: YES:Forced
    x-varnish: 1181448065 1181448001
    age: 10
    expect-ct: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
    server: cloudflare
    cf-ray: 422f1c1eddd121ce-EWR
    content-encoding: gzip

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    Actually you’re good.

    x-cache-handler:	php
    x-cacheable:	YES:Forced
    x-varnish:	1181448065 1181448001
    age:	10

    The fact that you have an x-cachable header AND an age of more than 0 means it’s a false positive, and I’ll tweak the plugin to change that to a lower level warning vs an error.

    The plugin is TRYING to be smart and tell you that it’s possible to configure autoptimize in a way that will break, but in this case, it’s not smart enough to understand “But this one’s okay.”

    Optimizing Matters

    (@optimizingmatters)

    Is there something I can do on Autoptimize’s side to avoid (or lessen the risk of) breakage Mika?

    sarangsss29

    (@sarangsss29)

    Hi @ipstenu Thanks for the reply. Could you reply to @optimizingmatters on this matter?
    Also, do you recommend Cloudflare caching? Or should I bypass CF caching?

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    Is there something I can do on Autoptimize’s side to avoid (or lessen the risk of) breakage Mika?

    I don’t think so since the problem is people don’t really understand what autoptimize actually is doing. It’s like WP Super Cache. Generally works fine with the plugin, but some of the weirder settings can cause things to go off.

    The biggest issue is with cache flushing. People edit CSS files directly, don’t reoptimize, and the cache flush doesn’t notice (because it’s only looking at WP) so they get really angry and tell me that the plugin isn’t emptying cache automatically.

    The point of the notice, and clearly it needs some rewriting, is a reminder. If you’re using extra features like an auto optimizer, or a CDN, or anything that gets between WP and Varnish (or really any cache service), you should be aware of what that feature is doing.

    Trying to balance education and fear is hard :/

    Optimizing Matters

    (@optimizingmatters)

    Thanks for the feedback Mika!

    Not entirely sure I understand the issue though;
    -> if without AO a CSS-file (e.g. a child theme’s) is changed. the user will have to purge varnish to make this visible.
    -> if with AO a CSS-file (e.g. a child theme’s) is changed. the user will have to purge varnish, upon which AO gets triggered (through WordPress), which aggregates all CSS, calculates the hash of the aggregated CSS which will be different as one of the source files is different and will inject the URL to the autoptimized filename with the hash in the filename in the HTML which will be cached by Varnish after which the change will be visible.

    AO, to be clear, does not do any page caching.

    So I’m not sure there really is a problem here? Or am I missing something?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Caching problems with Autoptimize’ is closed to new replies.