• Hey Salvatore,
    First of all – really REALLY impressed with this plugin – excellent work!
    A few questions:
    1.) I’m using worker mode (and it’s working great). I assume these settings don’t apply in worker mode? (at my origin I also have nginx w/ Fastcgi cache running rather than your fallback).

    Screenshot 2020-10-05 at 21.26.02


    In other words, in worker mode, the decisions about which items are served from the edge and which are served by the origin are solely down to the worker js?
    2.) Is there anything special required to ensure REST API calls are NOT served from cache in worker mode?
    3.) Does this plugin rely on any CF Page Rules to be setup in Cloudflare itself when in worker mode?

    Thanks and keep up the great work. I plan on writing up a tutorial in the near future ??

    Colm

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @colmtroy,

    1.) I’m using worker mode (and it’s working great). I assume these settings don’t apply in worker mode? (at my origin I also have nginx w/ Fastcgi cache running rather than your fallback).
    https://i.imgur.com/RLRgWnD.png

    The settings you have shown in the screenshot above, do apply even when you are using Worker mode. All settings you can see after enabling worker mode applies to the worker mode.

    On another note the reason we don’t recommend using fast cgi cache or other things is because when you are using the plugin’s fallback cache it is full control over the cache, i.e. when you update posts, pages, regenerating cache for those pages and related pages etc. But that is not the chase with server-level caching. Also server-level caching most of the times doesn’t generate a good HTML disk cache. Using the plugin fallback cache means the plugin can handle all caching situations. That’s all.

    2.) Is there anything special required to ensure REST API calls are NOT served from cache in worker mode?

    – You mean https://example.com/wp-json/* routes, right? If so, then yes. But as I have said in your amazing review. This will be fixed in the upcoming release of the plugin with an updated worker code. If you mean any other API endpoints, do share the endpoint example URL.

    3.) Does this plugin rely on any CF Page Rules to be setup in Cloudflare itself when in worker mode?

    – When you are using the worker mode the CF page rule of Cache Everything is not being used. You can basically use the page rule mode or the worker mode. When you are using the worker mode, the whole caching logic is managed by the worker. So, no Cache Everything page rules. But you can still use page rules for forwarding URLs or something if you want or you can handle everything via the overwritten worker script. ??

    Thanks and keep up the great work. I plan on writing up a tutorial in the near future ??

    – Thank you so much. Highly looking forward to it. ??

    Hope this helps. ??

    • This reply was modified 4 years, 1 month ago by iSaumya.
    Thread Starter colmtroy

    (@colmtroy)

    Hey @isaumya
    Re: cache settings still working in worker mode – that’s interesting! How does the worker figure out that a product page should be bypassed (assuming I’ve ticked that option in the plugin?). I couldn’t figure that out looking at the worker script.

    Re: API endpoints – great ?? I would also recommend adding support for legacy WC api endpoints “wc-api/v3” as documented here
    https://woocommerce.github.io/woocommerce-rest-api-docs/v3.html#schema

    There’s still a ton of people who rely on those.

    Re: page rules – great thanks for confirming that!
    Colm

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @colmtroy,

    How does the worker figure out that a product page should be bypassed (assuming I’ve ticked that option in the plugin?). I couldn’t figure that out looking at the worker script.

    The worker figures it out based on the cache-control header added by the plugin for that request and also some extra header added by the plugin which starts with x-wp-cf-*.

    I would also recommend adding support for legacy WC api endpoints “wc-api/v3” as documented here
    https://woocommerce.github.io/woocommerce-rest-api-docs/v3.html#schema

    – Thanks for the feedback. Added in the to-do list. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Query re: page rules in worker mode’ is closed to new replies.