WP Super Cache 0.8.7

WP Super Cache version 0.8.7 is now available. WP Super Cache is a page caching plugin for WordPress that will significantly speed up your website.

This release addresses some issues large or busy sites had with deleting expired cache files. Some sites generated so many cache files that there were two many files generated, even when those files were cleared out every hour. To fix that I limited the recursive function that deletes the files to 100 deletions at a time. That function is called until all the cache files are deleted (or strictly speaking, no files are deleted. That’s how the expired file cleanup works).
It’s also possible to set the garbage collection interval to 10 minutes now which will also help.

48 thoughts on “WP Super Cache 0.8.7

  1. Hi! after todays super cache 0.8.7 version update My homepage is chaching (homr.php), i already add this page into de reject urls but it still making the cache :s

    any ideias?

  2. this is one of my favorite plugins.
    great, powerful, and amazing.

    i’ve just upgraded to the new version.

  3. I’m glad that you addressed that issue, but there is a BIG outstanding issue that we’ve been discussing in the wordpress forum for a couple weeks now.

    Starting with .86, supercache has been caching but not serving cached pages. Perhaps it is only happening with certain server configs, but it is at least happening with Hostgator and bluehost on wp 2.6, and 2.7.
    There is no “cached page served” message starting with S.C. .86. going back to .85 worked.

  4. It’s still not working at cleaning up for me 😐

    WP-Cache

    * 12533 cached pages
    * 11641 expired pages

    WP-Super-Cache

    * 272 cached pages
    * 2443 expired pages.

    What’s even more odd is that super cache files are being killed faster then clean up.

    My settings are: 10 minutes clean up and 590 second expiry. The issue started at around .83+ I believe. I only have 10k of posts in the first place.

    Any idea what’s wrong? It’s been driving me nuts since 2 months ago with my site.

    Thanks

  5. Christopher – if you see html comments that look like this then your page is being served by the cache.

    Dynamic Page Served (once) in 1.504 seconds

    Cached page generated by WP-Super-Cache on 2009-01-10 20:41:40
    Compression = gzip

    There’s no way of checking if it’s static html or PHP without adding some debug code to the plugin. See this post for more.

    Unfortunately as a side effect, it’s not possible to display the “super cache gz” html comment now. To verify that html pages are being served from the supercache directory you’ll have to add an error_log() somewhere and check that visits aren’t logged.

    Vahid – that’s a hell of a lot of visitors. Do you get thousands of visitors per hour? The best thing to do is debug the sc_garbage_collection() function to see what files it’s deleting, perhaps removing the @ from in front of the unlink and rmdir commands and watching your error logs.

  6. I get around 600k-800k of page views a day, and your plugin is the lifeblood of the site lol. I’m now manually deleting the files by hand at this post 😐

    I have around 2k-2.5k of visitors with a 5 minute tracking timeout.

    What settings would you suggest I play around with? thanks

  7. donncha,
    are you saying that the plugin won’t ever say
    “cached page served” in HTML comments?

    This is a big problem. FYI your readme says that is how we can tell that it is serving cached files.

    If that readme is not true please explain how to use the error function you very briefly mention. thanks

  8. I have a busy sites too, it’s like 20,000+ pageviews/day and wp-super-cache have a problem with cleaning expiry files. What should I do? should I use crontab to delete the files?

  9. Hi,

    I have this error in my log since Dec-05-2008 (when I updated to 8.6):

    PHP Fatal error: Call to a member function get() on a non-object in /var/…/wp-includes/cache.php on line 93, referer: http://..

    Looking at the last error in the source I see


    function wp_cache_get($id, $flag = '') {
    global $wp_object_cache;

    return $wp_object_cache->get($id, $flag);
    }

    This guys have this problem too here and here. Both of them reported the problem after the 8.6 update.

    I checked my log and I’m sure the problem started after 8.6 update.

    Any idea what’s wrong? The last version did not solve this problem.

    Thank you.

  10. Christopher – add an error_log() statement in wp-cache-phase1.php after line 87. When you see the log statement that means the file was served from the WP-Cache php cache. If you don’t see it, and the file exists in the supercache/domain/path/blah/blah/index.html then it was more than likely served by the mod rewrite rules.

    http://ie2.php.net/error_log for how to use error_log()

    You can also look at the headers returned by the webserver. If they have “WP-Super-Cache: WP-Cache” then it’s served by the WP-Cache part of the plugin.

    I haven’t had time/forgot to update the documentation.

    Vahid, Kaef – you probably need to setup a cron job to delete the files unfortunately, or
    hire a developer who can look at your server and diagnose what’s wrong. I don’t have time in the immediate future I’m afraid.

  11. Vahid – can you update again? I updated wp-cache-phase2.php. I think the PHP opendir() command times out or the system runs out of file handles or something so I changed it to read an entire directory into an array. Hopefully that will help.

  12. I was having problems with the cache plugin on my wordpress blog so I deleted the plugin. Then I was unable to access my blog. It was like it was gone.

    I restored my blog from a backup, but a friend said that it might have been fixed with just an upload/restore of the .htaccess file due to file permissions changed.

    I am just sharing in case this happens to someone else.

  13. Hi Donncha,

    Understanding that this kind of question should be posted in the forums I decided to post it here instead due to a problem that showed up when I updated to 0.8.7.

    By what I can see over the past week, SuperCache is no longer deleting expired pages at all since I updated to 0.8.7. I don’t have a high trafficked blog yet my expired Super-Cache pages are in the thousands after 24 hours with the expiration time set to 6 hours. Normally I would see less than 200 expired pages listed under Super-Cache (WP-Cache expired pages is also high running into the several 100’s).

    Also noticed that a new post will not show up on the site until I delete the cache manually since I upgraded the plugin.

    I’m running WP 2.7 and the Misty Look theme.

  14. Will do and thanks! I’m going to wait 24 hours though since I made a change to the index.php file of Misty Look.

    In the original index.php file there was a hack that kept SuperCache from caching the index page of the any blog using the theme (hoping the code comes through here):

    ob_start('ml_hack'); (No idea why this was done)

    The “fix” for this was to add the following piece of code at the end of the loop:

    ob_end_flush();

    This allowed the index page to be cached properly by SuperCache but I’m wondering if this “fix” might be causing the problem I previously mentioned. I’ve since removed these two snippets of code and the index page of my site is still caching without a problem (small wonder there).

    If I still see the expiration problem tomorrow then I’ll download the new files and give them a go. I still have no idea why that “hack” was stuck into the index.php file of the theme in the first place. Removing it doesn’t seem to have any adverse affect on the site at all and the single.php file has no such hack.

  15. Donncha: Here’s an interesting bit–was running on 0.8.5 on WordPress 2.6. All was well. Saw 0.8.7, upgraded, and when I updated the site, the cache wasn’t refreshing…so I was three posts later before I realized that the site still had the old cached frontpage. I was seeing the latest because I was logged in, of course. Deleted the cache and all was again well. Tried it again to make sure I wasn’t imagining things (I rarely sleep and that does things to one’s mind, you know) and sure enough, that was the case. Backed off to 0.8.5…works fine now, when I update the site the cache for the front page refreshes.

    I hadn’t seen anybody else with this problem and I might be a one-off freak of some kind, admittedly, but I thought I’d let you know in case anybody else does run into this. When I do make my 2.7 upgrade in a few days, I’ll try it again and see what I encounter.

  16. Thanks a lot for all the hard work on WP Super Cache, Donncha; I happily use it across many sites. That said, I’m having the same issues as the previous commentator on a high-volume site. Everything seemed fine with 0.8.5, but with 0.8.7 the cache has been filling up indefinitely. And as with others, cleaning the cache manually is the only way to allow new content to appear publicly.

    All the best,
    -Chris

  17. This is great news. We are considering making a caching module for WP e-Commerce because we’ve never been able to make the two plugins play nice together; if a user updates a product no matter what we do in the Super Cache settings it seems to never update the product details…

    Do you think this issue might have been resolved 😛

    Anyway love your work mate!!! Talk soon…

  18. i have the same problem as Bruno has, the homepage is caching. i try to downgrade to 8.6 but it didn’t help. for now i Chmod to the index caching files (000).

  19. Yup, I’m also seeing the same thing with new posts not refreshing the homepage as well so I guess it’s not my theme or the hack I spoke about in my previous comment. Good to know.

    Donncha: I’ll give that dev build a go today and see how that fares.

  20. First, Donncha, this is a terrific plugin. But with the new version (ver. 0.8.7), I’m also having the “home page is caching and not updating with with new posts” issue as Kirk M and others have mention. Saw that the issue was posted in the forum, but no answer had been given.

    Any word on the issue or an update?

  21. Hi Donncha,

    I’ve updated SuperCache 0.8.7 with the new files and I’ve found that the home page is refreshing when a new post is published but only when logged in. As soon as I log out and clear my browser’s cache, the new post disappears from my home page until I log back into my admin(post appears again after hitting “ctrl + F5) and clear the plugin’s cache. Once the cache is cleared, the new post shows up on my main page when logged out.

    Half way there anyway. 😉

  22. An addendum to my earlier comment. After trying last night’s SVN build of wp-super-cache, as well as deleting and re-creating all related config files, I can safely say the issue still exists at least in the environments I’m exposed to. Please let me know if there’s anything we can help out with in terms of testing or additional info.

    All the best,
    -Chris

  23. Hey Donncha,

    Okay, that seems to have done it. I took the last test post and changed it’s published status to “draft” and it disappeared from the main page both logged in and logged out (using Chrome for logged in check and Firefox 3.1 builds for logged out). I then changed the status back to “published” and it returned to the main page in both browsers with just a simple refresh (did not have to bypass the cache with a hard refresh).

    I can also submit comments without the site going blank, delete the cache and change the SuperCache options without a problem. Looks like you solved it.

    Nice work, sir. I’d be interested to know what it was.

  24. Donncha, looks like it worked in our case as well! Thanks for the quick turn-around. I really appreciate your efforts on this invaluable project.

    -Chris

  25. Hi, I’m from germany. So sorry for my bad english. Thanks for this great plugin. Today I wrote “addhandler php5-cgi .php” in my .htaccess file to use passthru(), system() and exec() for some other plugins. After doing this wp-super-cache was not working longer and I was crying. Do you know what the problem is or what i should do to run wp-super-cache with the cgi mode?

  26. I’ve updated SuperCache to 0.8.8, it still displays the expire files when using the “google chrome” , while IE6 display newer file.

    why the expired pages still cannot be deleted ?

  27. Hey Donncha,

    Same issue as Vahid
    I can give you access to my high traffic site if you want to see it in action personally.

    During the day the site takes as much 200-300 people online at the same time. That’s not spikes ..normal traffic 🙁

    We get about 200 comments per day …so we had to enable lockdown all the time, else the site would flatline as soon as you click Approve. Not sure what’s happening.

  28. Hi Donncha,

    I have a new install on the above site and sometimes it loads really slowly. I am wondering if I install the super cache it would speed up the load time ?
    Thanks and I will come back to your site for lots of great information.

    habba

  29. I am having an issue mentioned in several other comment. index.php is caching and it shouldn’t be. I can’t get fresh content on the main page and the current page was generated hours ago. What do I do?

  30. Anyone else having problems with this on the latest version of WordPress? It’s slowed my site down to a crawl for some reason.

    1. Best thing to do is post to the support forum linked from the settings page but also use the debugger in the plugin to see what the plugin is doing. It may make it clear where the slowdown is.

Comments are closed.

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close