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 Comments

fikret (1 comments.) on January 9, 2009 at 11:01 pm.

thx, upgrading it now

Reply

Bruno (1 comments.) on January 9, 2009 at 11:14 pm.

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?

Reply

Pande (2 comments.) on January 10, 2009 at 1:14 am.

Always improving! Thanks
Happy 2009!

Reply

Mus_ (2 comments.) on January 10, 2009 at 3:34 am.

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

i’ve just upgraded to the new version.

Reply

Greg M (1 comments.) on January 10, 2009 at 4:31 am.

Thanks again for your continued work on an essential WordPress plugin. I’m really digging the new theme too!

Reply

Christopher (7 comments.) on January 10, 2009 at 5:56 am.

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.

Reply

Vahid (6 comments.) on January 10, 2009 at 7:59 am.

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

Reply

Donncha (1707 comments.) on January 10, 2009 at 8:52 pm.

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.

Reply

Vahid (6 comments.) on January 10, 2009 at 11:47 pm.

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

Reply

Christopher (7 comments.) on January 10, 2009 at 11:58 pm.

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

Reply

Kaef on January 11, 2009 at 3:26 am.

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?

Reply

definitelynot on January 11, 2009 at 4:28 am.

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.

Reply

Donncha (1707 comments.) on January 11, 2009 at 8:30 am.

definitelynot – the plugin doesn’t use the object cache. It must be another plugin.

Reply

Donncha (1707 comments.) on January 11, 2009 at 8:38 am.

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.

Reply

Donncha (1707 comments.) on January 11, 2009 at 9:19 am.

It’s too early on Sunday morning to be doing this stuff.. anyway, grab the files in http://svn.wp-plugins.org/wp-super-cache/trunk/ and manually copy into your plugins/wp-super-cache/ folder. It uses opendir() and readdir() instead of glob() which might fix problems with lots of files, or filenames with unusual characters.

Reply

Vahid (6 comments.) on January 11, 2009 at 7:01 pm.

Thanks donncha trying them right now :)

Reply

Donncha (1707 comments.) on January 12, 2009 at 5:44 pm.

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.

Reply

Donncha (1707 comments.) on January 12, 2009 at 5:53 pm.

Never mind, a small bug overwrote the directory pointer, but update anyway, reading into an array may fix it.

Reply

CyberCelt (1 comments.) on January 13, 2009 at 6:31 pm.

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.

Reply

Kirk M (16 comments.) on January 13, 2009 at 6:49 pm.

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.

Reply

Donncha (1707 comments.) on January 13, 2009 at 7:32 pm.

Kirk – Want to try the development version? Grab the files from http://svn.wp-plugins.org/wp-super-cache/trunk/ and copy into your wp-super-cache plugins folder.

Reply

Kirk M (16 comments.) on January 13, 2009 at 8:01 pm.

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.

Reply

Vahid (6 comments.) on January 14, 2009 at 2:36 am.

The previous version gave me problems, so i’ll try the new one and report back :)

Reply

Widge (1 comments.) on January 14, 2009 at 6:09 am.

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.

Reply

Chris (3 comments.) on January 14, 2009 at 7:10 am.

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

Reply

Bradford (1 comments.) on January 14, 2009 at 8:27 am.

Hey! I have this theme! Pretty awesome, keep up the good work on this plugin.

Reply

Dan Milward (2 comments.) on January 14, 2009 at 9:10 am.

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 :P

Anyway love your work mate!!! Talk soon…

Reply

Itai (1 comments.) on January 14, 2009 at 11:47 am.

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).

Reply

Kirk M (16 comments.) on January 14, 2009 at 3:51 pm.

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.

Reply

Wil on January 14, 2009 at 4:01 pm.

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?

Reply

Kirk M (16 comments.) on January 14, 2009 at 5:29 pm.

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. ;)

Reply

Chris (3 comments.) on January 14, 2009 at 6:25 pm.

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

Reply

Vahid (6 comments.) on January 15, 2009 at 9:55 pm.

Yep the issue still exists, thanks for trying though.

Reply

Donncha (1707 comments.) on January 15, 2009 at 11:18 pm.

Ok, I think I found the problem. Grab the files from http://svn.wp-plugins.org/wp-super-cache/trunk/ and upload to your wp-super-cache folder and make a test post. Does the supercache index.html for the front page update?
If it does, I’ll make a new release tomorrow.

Reply

Kirk M (16 comments.) on January 16, 2009 at 3:26 am.

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.

Reply

Kirk M (16 comments.) on January 16, 2009 at 3:28 am.

Now why isn’t my Gravatar pic showing up I wonder?

Reply

Chris (3 comments.) on January 16, 2009 at 3:42 am.

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

Reply

Donncha (1707 comments.) on January 16, 2009 at 5:07 pm.

Version 0.8.8 has the fix I made last night. Basically, the garbage collection function was looking for a directory, and I had forgotten that I pass it the index.html of the front page when a post is updated.
Therefore the page wasn’t updated!
I’ve also added some simple debug code. See the changelog for details: http://svn.wp-plugins.org/wp-super-cache/trunk/Changelog.txt

Reply

Tim on January 17, 2009 at 7:54 pm.

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?

Reply

Vahid (6 comments.) on January 18, 2009 at 12:47 am.

I wish that would have done it for me, still have the garbage collection issue, just not as bad.

Reply

suny (1 comments.) on January 18, 2009 at 10:06 am.

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 ?

Reply

kest on January 19, 2009 at 5:57 am.

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.

Reply

habba (1 comments.) on January 26, 2009 at 9:44 pm.

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

Reply

Shawn Wasson (1 comments.) on February 7, 2009 at 6:43 pm.

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?

Reply

Harry (1 comments.) on May 13, 2012 at 1:03 pm.

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

Reply

Donncha O Caoimh (105 comments.) on May 14, 2012 at 11:20 am.

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.

Reply

Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Holy Shmoly! is Stephen Fry proof thanks to caching by WP Super Cache