• Does WP Super Cache clear the cache files in the following page types when posts are made?

    • /category/*
    • /tag/*
    • /etc/*
Viewing 8 replies - 1 through 8 (of 8 total)
  • You can force the plugin to clear the cache when you post. It’s an option in the admin page configuration page now.

    Hello donncha,
    i have blog with more than 2000 posts (1000 visits per day) and I’m very interested to install WP Super Cache plug in, but i have a doubt whether the plug-in will handle too much posts?

    Hey Southdreamz,

    Based on what I know about Super-Cache, I don’t think it matters that you have 2,000+ posts (congrats on reaching that milestone, by the way). What matters is the posts which actually receive hits. Those are the posts/pages that will be cached and served out statically to the next visitor. What I would suggest (again, take my advice with a grain of salt), is not force clear the cache (as Donncha pointed out, it’s an option on the admin page) if a lot of DIFFERENT posts receive hits.

    For example, let’s say that your 1,000 daily visitors ended up viewing only 20 different posts. I think you could clear the cache (if you wanted) since it won’t take very long to destroy 20 cached files. However, if the same 1,000 daily visitors ended up viewing 500 different posts (probably a very rare situation), I wouldn’t clear the post since it would delay the time in publishing as Super-Cache has to clear all those cached files.

    Just my two cents. ??

    Thread Starter webmaestro

    (@webmaestro)

    A couple of questions regarding enabling:

    [x] Clear all cache files when a post or page is published.
    (This may significantly slow down saving of posts.)
    1. Under WPMU does that setting clear the cache *only* on that specific blog?
    2. We have so many visitors & posts, as well as a Google Search Appliance, that it’s not uncommon to see 60k+ cache files in cache/ and a similar or greater number in cache/supercache/*/*. As a result, making config changes to WP Super Cache frequently results in response timeouts. I’m concerned this would lead to more timeouts and complaints from my users.

    If the cache/supercache/*.blogdomain.com/category/* & cache/supercache/*.blogdomain.com/tag/* are not being cleared according to the settings in the WP Super Cache admin page (Expire time [180] seconds]; and Garbage Collection (o) Once every hour are ignored), what guarantee do I have that the Clear all cache files when post or page published will work?

    Until this issue is resolved, I’ve resorted to running a cachebusting cron every 20 minutes:

    #!/bin/bash
    export PATH=/path/to/bin:$PATH
    lockfile=/tmp/cachebuster.lck
    if [ -e $lockfile ] ; then
            echo "Cache buster is already running.  Exiting..."
            exit 0
    else
            touch $lockfile
    fi
    
    echo "***** Start: <code>date</code> *****"
    
    gfind /path/to/wordpress-mu-X.Y.Z/wp-content/cache -maxdepth 1 -type f -name '*.blogdomain.com*.html' -mmin +5 -print -exec rm -f {} \;
    gfind /path/to/wordpress-mu-X.Y.Z/wp-content/cache/supercache -type f -mmin +5 -print -exec rm -f {} \;
    
    echo "***** End: <code>date</code> *****"
    rm $lockfile

    Hello rishk789,
    Thanks for your detailed information. This is what i want to know.
    great!

    webmaestro – When garbage collection is done, it’s done on every blog’s cached files, not just the current blog.

    Are you saying that the hourly garbage collection doesn’t happen? Does future posting of posts work? The GC is called using the same technique.

    Actually, on an MU site, the garbage collection will probably happen a lot more than once an hour because the time of the last GC is stored in individual blog options tables, not the sitemeta table.

    If it’s not working, you should open wp-cache-phase2.php and debug wp_cache_gc_cron() and check if wp_cron.php is being called by checking your logs.

    Thread Starter webmaestro

    (@webmaestro)

    Thanks! I’ll take a look! My users are eager to see this issue resolved… BTW, is there a place where WP Super Cache debug techniques are discussed? I searched, but haven’t found them.

    There isn’t any place. Try using error_log() to tell you what gets executed or not (use Google to figure out how to use it).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP Super Cache] Clear /category/*, /tag/*, /etc/*?’ is closed to new replies.