• Resolved asterix30

    (@asterix30)


    Hi!

    First of all, awesome plugin, thank you!

    Caching plugin used, besides WP Cloudflare Super Page Cache:
    WP-Rocket with wp-rocket own page cache turned off.
    OMGF | Optimize My Google Fonts.

    My questions:
    1. Fallback cache is working fine, but I see pages cached, which shouldn’t be cached. i.e. including queries from requests, sitemap pages. Settings on CloudFlare for queries is set to = Ignore Query String. e.g:
    URL__utm_referrer_https_253A_252F_252Fyandex_ru_252F_253Ffrom_253Dalice.html
    URL__utm_referrer_https_253A_252F_252Fyandex_ru_252Fsearchapp_253Ffrom_253Dalice_2526text_253D.html
    _.html

    setting Don’t cache the following static contents set/checked, but still:
    page_sitemap1_xml.html
    page_sitemap2_xml.html
    page_sitemap3_xml.html

    domain.com/wp-links-opml.php

    2. If I check/set “Don’t cache the following dynamic contents = Pages with query args” in the plugin settings, then only main page is being cached and saved to fallback dir, then the rest pages are getting BYPASS header.

    3. If I use nginx’s fascgi microcaching, then all pages are being cached accept main page. i.e. I see BYPASS from CF and no x-wp-cf-super-cache is being set. (additional headers from your FAQ added to nginx config)

    Appreciate any help you can provide!
    Thank you, Alex.

    • This topic was modified 3 years, 6 months ago by asterix30.
    • This topic was modified 3 years, 6 months ago by asterix30.
    • This topic was modified 3 years, 6 months ago by asterix30.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @asterix30,
    Thanks for reporting this issue. Though this issue will not create any problem on the website but yes the extra caching file taking extra space is not a good thing. I’m tagging @salvatorefresta in this thread so that he can fix it in the upcoming version.

    The reason it is happening is that the fallback cache only caches GET requests. So, technically those URLs with query strings are a GET request and that’s why it is caching them.

    We will work on making sure that that kind of query strings are excluded from fallback cache. For now, you can do the following:
    Go to the plugin settings,
    Go inside the Cache tab
    Under fallback cache there is a section named: Prevent the following URIs to be cached
    Inside there type: /*utm_referrer*

    This will make sure any GET URL with has utm_referrer in its URL, fallback cache won’t create a cache for that URL.

    Hope this helps. 🙂

    Thread Starter asterix30

    (@asterix30)

    Hi.

    Thank you for your prompt reply. I see 2 input fields called – Prevent the following URIs to be cached. Should I place /*utm_referrer* into both of them?

    Thanks

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @asterix30,
    No, put it for the fallback cache section only. As you simply don’t want to create fallback cache for those type of URL GET requests.
    Here is a screenshot: https://i.imgur.com/O7JbVOn.png

    Thread Starter asterix30

    (@asterix30)

    thank a lot. I will try.

    Have a nice day

    Thread Starter asterix30

    (@asterix30)

    UPDATE.

    I have another related question. I see such entries in logs:
    FastCGI sent in stderr: “PHP message: PHP Warning: file_put_contents(/var/www/vhosts/domain.com/httpdocs/wp-content/wp-cloudflare-super-page-cache/domain.com/fallback_cache/geometria_mnogougolniki_glava_4_parallelogramm_i_ego_svoistva_srednyaya_liniya_parallelogramma_opredelenie__back_https_3A_2F_2Fwww_google_com_2Fsearch_3Fclient_3Dsafari_26as_qdr_3Dall_26as_occt_3Dany_26safe_3Dactive_26as_q_3D_D0_A1_D1_80_D0_B5_D0_B4_D0_BD_D1_8F_D1_8F+_D0_BB_D0_B8_D0_BD_D0_B8_D1_8F+_D0_BF_D0_B0_D1_80_D0_B0_D0_BB_D0_BB_D0_B5_D0_BB_D0_BE_D0_B3_D1_80_D0_B0_D0_BC_D0_BC_D0_B0_26channel_3Da65768723689e92c28a4bc62f0445c134.html): failed to open stream: File name too long in /var/www/vhosts/domain.com/httpdocs/wp-content/advanced-cache.php on line 110” while reading response header from upstream, client: 162.158.88.123, server: domain.com, request: “GET /geometria/mnogougolniki/glava-4-parallelogramm-i-ego-svoistva/srednyaya-liniya-parallelogramma-opredelenie/?back=https%3A%2F%2Fwww.google.com%2Fsearch%3Fclient%3Dsafari%26as_qdr%3Dall%26as_occt%3Dany%26safe%3Dactive%26as_q%3D%D0%A1%D1%80%D0%B5%D0%B4%D0%BD%D1%8F%D1%8F+%D0%BB%D0%B8%D0%BD%D0%B8%D1%8F+%D0%BF%D0%B0%D1%80%D0%B0%D0%BB%D0%BB%D0%B5%D0%BB%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B0%26channel%3Daplab%26source%3Da-app1%26hl%3Dru HTTP/1.1”, upstream: “fastcgi://unix:///var/www/vhosts/system/domain.com/php-fpm.sock:”, host: “domain.com”

    Looks like something is trying to pass query parameters to the file system. Queries are coming from CloudFlare.
    Is it plugin related? I can’t figure out.

    Thank you

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @asterix30 ,
    can you tell me what version of plugin are you using?

    Thread Starter asterix30

    (@asterix30)

    Hi @salvatorefresta

    I use the latest ver. 4.3.6

    Thread Starter asterix30

    (@asterix30)

    Hi again.

    Can you help me to understand the question #2:
    2. If I check/set “Don’t cache the following dynamic contents = Pages with query args” in the plugin settings, then only main page is being cached and saved to fallback dir, then the rest pages are getting BYPASS header. There are not visible queries in the nginx logs. Just clean URLs.

    I am trying to figure out what’s wrong. Nginx config? Or something else. Without this setting fallback cache is working fine, just catching weird queries along with GET requests, which I then manually disallow in the plugin’s fallback cach settings.

    Here are headers from the console:
    Response Headers
    alt-svc: h3-27=”:443″; ma=86400, h3-28=”:443″; ma=86400, h3-29=”:443″; ma=86400
    cache-control: no-store, no-cache, must-revalidate, max-age=0
    cf-cache-status: BYPASS
    cf-ray: 5e4376353fc61ce0-BUD
    cf-request-id: 05de08354500001ce00d0b7000000001
    content-encoding: br
    content-type: text/html; charset=UTF-8
    date: Sun, 18 Oct 2020 15:58:36 GMT
    expect-ct: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
    expires: Sun, 18 Oct 2020 15:58:36 GMT
    nel: {“report_to”:”cf-nel”,”max_age”:604800}
    pragma: no-cache
    referrer-policy: strict-origin-when-cross-origin
    report-to: {“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report?lkg-colo=123&lkg-time=1603036717″}],”group”:”cf-nel”,”max_age”:604800}
    server: cloudflare
    status: 200
    strict-transport-security: max-age=31536000; includeSubDomains; preload
    vary: Accept-Encoding
    x-content-type-options: nosniff
    x-download-options: noopen
    x-frame-options: SAMEORIGIN
    x-wp-cf-super-cache: no-cache
    x-wp-cf-super-cache-cache-control: no-store, no-cache, must-revalidate, max-age=0
    x-xss-protection: 1; mode=block

    Request headers:
    :authority: domain.com
    :method: GET
    :path: /path/
    :scheme: https
    accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    accept-encoding: gzip, deflate, br
    accept-language: en-US,en;q=0.9,sv;q=0.8
    cache-control: no-cache
    cookie: __cfduid=dbf5ef2953926ec118996fc1d33a390431603036125; cookielawinfo-checkbox-necessary=yes; caosLocalGa=GA1.2.2121545134.1603036128; caosLocalGa_gid=GA1.2.543226826.1603036128; __gads=ID=148128023f178b61-22b0da864ba6004f:T=1603036126:RT=1603036126:S=ALNI_MaToh5vMhh0V2igoie9OUPOXWQASQ; CookieLawInfoConsent=eyJuZWNlc3NhcnkiOnRydWV9; viewed_cookie_policy=yes; _gat=1
    pragma: no-cache
    referer: https://domain.com/
    sec-fetch-dest: document
    sec-fetch-mode: navigate
    sec-fetch-site: same-origin
    sec-fetch-user: ?1
    upgrade-insecure-requests: 1
    user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.271

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘fallback cache questions’ is closed to new replies.