Support » Plugins » [Plugin: WP Super Cache] Multiples caches of same page

  • Resolved domingou


    If i delete the cache and then access a page with different browsers (ie, firefox, chrome) I get a new page for each browser getting 3 caches of the same page. Is this the expected behavior?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Do you mean you get 3 WP-Cache caches? What are the filenames?


    The three are the same page with equal size

    By the way this happens with many pages of my site, that on cache are duplicated.


    I just looked in my own cache directory and haven’t seen this, and the code that generates the md5 string doesn’t include the browser user agent. Not sure how that’s happening.


    I can replicate that easily logging in with multiple browsers, and to a lesser extent when not logged in. Neither scenario has anything to do with the browsers themselves.

    The following are from Opera & Safari both logged in as admin on the same site:

    Opera: WP Cookie check,admin|1225358221|aaa0fa7a513774eb2af8a6a09ebb7fb6,
    Safari: admin|1224321519|1a689ac78c2fe15a07952c854d52ab23,WP Cookie check,

    The hashes are different, but even if they were the same, the order of the cookies would cause separate cache files to be created, as would the different timestamps. The different cookie order comes (I believe) from the fact that Safari was logged in, whereas Opera was logged in, out and in again.

    Fact: Multiple browsers logged in as the same user will almost certainly generate separate cache files.

    I’ve also seen the following when logged in…

    admin|1225358221|8228982bd4af22eb1476cb3f01dc1daa,WP Cookie check,admin|1225358221|aaa0fa7a513774eb2af8a6a09ebb7fb7,

    i.e. Multiple user cookies with the same timestamp, but different hashes. This is usually short-lived; one of them will eventually disappear.

    As for not logged in users; there is an issue with the default name of TEST_COOKIE in wp-settings.php which causes users who were logged in (or failed to log in) to be treated as though they are – i.e. no SuperCache…

    if ( !defined('TEST_COOKIE') )
    	define('TEST_COOKIE', 'wordpress_test_cookie');

    Adding something like…

    define('TEST_COOKIE', 'wp_test_cookie');

    …to wp-config.php gets around that problem by removing that cookie from supercache’s regex radar and also removes it as a potential problem source with respect to cookie order for logged in users.

    Fact: With the default TEST_COOKIE, a never-logged-in browser will generate a separate cache file from one which was logged in (or attempted, but failed).

    If lots of browsers are logged in as the same user, as far as I can see; all bets are off, but I really think it’s a non-issue. How many end-users are going to be browsing the site logged-in with multiple browsers?

    P.S. This is all on my dev site which is a WordPress trunk checkout with nearly everything using default values.

    Thanks for that great explanation Murmatron 2, now I understand how it works.


    Thanks for debugging that! I agree it’s not a common case but perhaps the plugin should watch out for the test cookie, just in case.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Super Cache] Multiples caches of same page’ is closed to new replies.