• Resolved jetxpert

    (@jetxpert)


    We use both SG Optimizer and Cloudflare.

    Unfortunately, and for a long time now, SG Optimizer’s Dynamic Cache feature does not appear to be working. Every time we perform a Dynamic Cache test, we get this message: “The URL is not cached

    Research reveals SG is already aware of the above condition (four months ago), and indicated a fix would be released “next week” – as stated here.

    Questions:

    (1) Has the fix been implemented? If so, what plugin version incorporates the fix and why do we keep getting the above message?

    (2) If the fix has been implemented, shouldn’t the SG Optimizer plugin be updated to auto-detect websites that use Cloudflare and provide a message in the backend that states: “Your website is using Cloudflare. Therefore, Dynamic Caching has been deactivated.” (or something like it)

    (3) If the fix has been implemented, why do we keep seeing the header: “x-proxy-cache: MISS” as shown here“?

    Many SG clients remain confused or frustrated with the above or are unaware that their website(s) are not being dynamically cached.

    Again, a fix is appreciated and/or additional information or changes should be added to your plugin to auto-detect Cloudflare, etc.

    As always, thank you for your help!

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    I don’t know who told you what but there is no such problem and my team is not working on it because…well there is no such problem.

    We don’t cache when there is a cookie session or exclude or something is sending headers for us not to cache.

    You have full page caching on Cloudflare working on that site. Based on the headers send you are not using SGO for that.

    So it’s just a regular case of plugins incompatibilities. Remove that WP Rocket and all the stuff it leaves behind (including the line disabling cache in the wp-config.php) and the cache should start working properly.

    Thread Starter jetxpert

    (@jetxpert)

    @hristo-sg,

    Here’s the statement provided by Stanimir Stoyanov: (did you read the info inside the link shared above?)

    Hey @johnhotpmo

    Correct, the dynamic caching is not working, because the Cloudflare is caching your pages, along with the headers sent from our servers.

    We will release a new version next week, with improved test fields for both Cloudflare and dynamic cache.

    But you shouldn’t worry about this now, because your site is being cached by cloudflare.

    Regards,
    Stanimir

    @jetexpert I see that your issue is marked “resolved”. do you mind sharing what was done to fix your issue?

    Thanks.

    Thread Starter jetxpert

    (@jetxpert)

    @onegoodroad,

    Issue is not resolved. Issue was marked “Resolved” by SiteGround without our acknowledgement.

    We have confirmed that SG’s Dynamic Cache DOES NOT work with or without WP Rocket. It only works when Cloudflare is deactivated or Cloudflare’s cache level is set to “Standard.”

    Recommend not worrying about SG’s Dynamic Cache and simply use Cloudlfare with cache level set to “Everything.” In combination with WP Rocket and using the proper settings, our website is quite fast (Loads in 1 to 3 seconds).

    Cheers!

    @jetexpert,

    Thank you for your reply! Very helpful. I will give it a go!

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    You insist on using WP Rocket which breaks the caching and causes all sorts of problems. There isn’t much we can do about it. There isn’t any issue with SGO or Cloudflare. It’s your site sending caches telling the systems not to cache and they do exactly what they are supposed to do.

    If you can’t figure out what is sending those headers, I would recommend hiring a developer. I can assure you it’s not SGO or Cloudflare.

    hi i am experiencing some caching problems too! also using SG optimizer and Cloudfare at same time and my site is loading very very slow! i am pretty sure i a having caching problems but i can’t find help i tried with cloudfare support i will try here. i think there might be a conflict.
    i have made a staging copy of my site the only difference between the staging copy and the live site is that cloudfare is not activated in the subdomain staging copy and suddenly the staging coppy is loading much better than the live site.
    please help me solve this. i dont want to deactivate cloudfare since DNS spreading and time down of the site but i must have some conflict and i need someone who understands to have a look.
    mi live site is: https://ponponi.co.il
    my staging copy: https://www.staging2.ponponi.co.il/
    i see this problem specialy in chrome in android devices if you have never enter the site or you clear browser cache you will se how bad it loads
    i hope somone can help me solve this issue

    @betumayo Hello,

    I know how difficult it can be to get to the bottom of some of this sometimes…
    I have spent a good amount of time doing just that and think I have things under control a bit (while using SG AND CF together)… at least on this particular site of mine.

    Here are both of our sites’ headers (from lighthouse) for you to review and compare:

    headers from MY site:
    CF CACHE:
    age: 810
    alt-svc: h3-27=”:443″; ma=86400, h3-28=”:443″; ma=86400, h3-29=”:443″; ma=86400
    cache-control: max-age=14400, s-max-age=604800, s-maxage=604800
    cf-apo-via: tcache
    cf-cache-status: HIT
    cf-ray: 63f6142d4c1e983f-LAX

    SG CACHE:
    server: cloudflare
    sg-optimizer-cache-control: s-max-age=604800, s-maxage=604800, max-age=60
    sg-optimizer-worker-status: hit
    vary: Accept-Encoding, User-Agent
    x-cache-enabled: True
    x-httpd: 1
    x-proxy-cache: MISS
    x-proxy-cache-info: 0 NC:000000 UP:

    headers from YOUR site:
    CF CACHE:

    alt-svc: h3-27=”:443″; ma=86400, h3-28=”:443″; ma=86400, h3-29=”:443″; ma=86400
    cf-cache-status: DYNAMIC
    cf-ray: 63f611e61d1835fd-LAX
    cf-request-id: 096da983d3000035fdc6932000000001

    SG CACHE:
    server: cloudflare
    vary: Accept-Encoding
    x-cache-enabled: True
    x-httpd: 1
    x-pingback: https://YOURSITE/xmlrpc.php
    x-proxy-cache: HIT

    Based on just looking at the headers, our setups seems to be somewhat different. With clouldflare we are using their WP APO (costs i think $5/mo) and then in the SG Optimizer plugin admin, I activated cloudflare there.

    Hope this helps a little!

    you mean you donloaded the cloudfare plgin to your wordpress and purchased the Automatic Platform Optimization for WordPress in cloudfare right?

    SG Optimizer plugin admin, I activated cloudflare there.>> eith this you mean gouing to the last tab and enabling “Cloudflare Full Page Caching” ?

    @betumayo

    Well, here is a very detailed article on cloudflare’s WP APO (from a different hosting service, but still applies). I don’t, in fact, have my cloudflare plugin activated at all now. I just use SG Optimizer for that.

    This section specifically details the steps involved:

    https://kinsta.com/blog/cloudflare-apo-wordpress/#how-to-use-cloudflare-automatic-platform-optimization-for-wordpress

    Hope this explains what you need!

    Thread Starter jetxpert

    (@jetxpert)

    Update:

    Issue fixed as follows:

    (1) If you’re using WP Rocket

    Add the following filter to your functions.php file or via code snippets (plugin):

    add_filter('rocket_htaccess_mod_expires', '__return_false');

    (2) If you’re using a booking plugin such as Bookly or Bookme Pro

    Go to the plugin’s settings and deactivate any setting related to saving or remembering customers’ session (i.e., personal) information using cookies. Also, ensure the plugin is being used (via shortcode) only on the pages where it’s needed (e.g., booking page), not your entire website.

    Details: https://prnt.sc/11ehm6p

    Hope the above helps.

    Cheers!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Dynamic Caching and Cloudflare’ is closed to new replies.