• Hey there,

    First of all thanks for the great plugin.

    Today I spent almost 5 hours trying to understand cache files generation logic, and even googling I did not found it.

    I use cache warming ssh script like this:
    # cleaning first
    /usr/local/bin/wp super-cache flush;
    /usr/local/bin/wp cache flush;
    #
    wget –content-disposition –reject-regex “wp-json|wp-includes|login|register” –reject=${WARMLY_REJECT} –spider -o wget-${DOMAIN}.log -e robots=off -r -l 5 -p -S –header=”X-Bypass-Cache: 1″ ${DOMAIN}
    #
    #and once again with mobile useragent
    wget –content-disposition –reject-regex “wp-json|wp-includes|login|register” –reject=${WARMLY_REJECT} –spider -o wget-${DOMAIN}-mob.log -e robots=off -r -l 5 -p -S –header=”X-Bypass-Cache: 1″ ${DOMAIN} –user-agent=’Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A366 Safari/600.1.4′

    The problem I found, that cache files
    index-https-mobile.html
    index-https-mobile.html.gz
    index-https.html
    index-https.html.gz
    were created successfully, but
    meta-wp-cache-xxxxx
    wp-cache-xxxxxx
    files were not created.

    Opening pages via browser using the inspector I found significant delay of opening the page first time, and second time its going faster. Analyzing this behavior I saw that these
    meta-wp-cache-xxxxx
    wp-cache-xxxxxx
    were created.
    However the lifetime of these two files are much shorter than planned cache lifetime, and like in ~40-60 minutes these two regenerates again and again.

    The strange thing is that on one another web I manage, there are no these two files at all (but I do not use extra mobile cache version on it).

    Can you suggests what should I do to set up the cache correctly?

    PS:
    – I use all the webs under Cloudflare;
    – Redis object cache is working as well;
    – both websites have mostly static content, so cache warming script I start once in 6 hours;

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you try the debug feature in the plugin? Have it enabled and run those scripts.
    You should see the plugin create cache files.
    Then visit the page and see what the debug log shows. If you’re logged in on your browser then you’ll be shown a different cache file because you’re logged in, and the wget requests are not.

    Thread Starter ontario777

    (@ontario777)

    Thank you for the reply.
    No debugging yet, because can not find description of the logic creating cached files
    meta-wp-cache-xxxxx
    wp-cache-xxxxxx
    even on another my web there are no these files at all.

    Can you please provide a link where I can find this logic algorithm?

    Those files are created for “logged in” or “known users” or basically any visitor with a cookie in their browser for your site.
    Look at wp_cache_serve_cache_file in wp-cache-phase2.php

    Thread Starter ontario777

    (@ontario777)

    Thank you.
    The question is that I found this behavior in the incognito mode (yes, fresh open single incognito window) , even from two browsers, Google Chrome and in FF.
    Sometimes page loading is good (0,2…0,3 sec), from the cache, but reloading page in 30-60-90 minutes this or another pages starting loading slow (2,0 … 4.0 sec), that’s why I found it.

    Do you have a cookie banner? That will add a cookie when the button is clicked. The debug log should offer some clues to why those cache files are being created.

    Those files are served almost as quickly as the index.html type files. I don’t worry about my blog using those files.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘meta-wp-cache and wp-cache files updates’ is closed to new replies.