• Hi. While debugging a problem with WP-Super-Cache on my blog, I noticed that the settings page is only showing half as many super-cached pages as it should. For example, if my …/wp-content/cache/supercache/ directory contains 12 cached files (none expired), the settings page will only claim to have 6 files cached. It appears that the cause is this line:

    echo "<ul><li>" . intval($sizes['cached']/2) . " Cached Pages</l
    i>";

    in wp-cache.php. A similar “/2” factor is used in calculating the expired pages, but I haven’t checked to see if it’s demonstrating the same issue. I’m not clear what the intent of this divisor is, so maybe I’m getting the source of the problem wrong, but I’m my super-cached page count is definitely off by a factor of 2. It’s not a major problem, but it is a bit annoying (especially as it led me to believe that only some pages weren’t being cached properly, which caused me to spend a decent bit of time going down the wrong path while debugging a different problem).

    Anyway, I just wanted to report the problem. Thanks for all the work on this plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dpark

    (@dpark)

    After a bit more investigation, it looks like this is a glitch that arises when compression is disabled. Turning compression on causes there to be two copies of every cached file (compressed and uncompressed), so this divisor makes sense. When compression is disabled, though, I believe this divisor should be set to 1.

    Thanks dpark, good catch. I fixed it by changing the divisor when compression is disabled!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Super Cache] WP-Super-Cache reporting half as many cached files as it should’ is closed to new replies.