WP Super Cache 0.8.4, the garbage collector

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

This is a minor release but was prompted by White Shadow. He released a plugin that cleans up expired cache files on a periodic basis instead of after X number of hits. Great minds think alike, (or fools seldom differ) because I had the same idea a few weeks ago and had the code running on this blog for that time without any problems.

WP Super Cache 0.8.4

The garbage collection system should have operated this way in the first place, but at least now it’s easier to configure.


33 Comments

Matt on October 24, 2008 at 2:31 pm.

Thanks for the update Doncha, amazing plugin!.

Although, there is still a small bug, for me at least.

I can’t disable “No Adverts for Friends plugin is enabled. (requires friendsadverts.php too)”

I guess it’s not a problem as I don’t have friendsadverts.php.

Thanks

Reply

Gofree (2 comments.) on October 24, 2008 at 2:45 pm.

I first used it and now removed cz it automatic create file and assigned right as user 99 to files/folder which then can’t be modified.
I emailed my host, and they suggested me to avoid this. This is very unlucky me to not use this such great catch.

Any idea then?

Reply

Geren (3 comments.) on October 24, 2008 at 3:15 pm.

Wow! What an amazing difference in load times — even on my more complex sites. Great!

Reply

Scott at Realepicurean (1 comments.) on October 24, 2008 at 6:12 pm.

So how often should a user like me, with just a few hundred visitors per day, delete cached files?

Reply

sleejay (1 comments.) on October 24, 2008 at 8:06 pm.

I’ve been running super cache on my sites for a while now, and my server load was cut almost in half! Any update to possibly the most important, and most functional wp plugin is exciting! Thanks for stopping my server crashes!!!

Reply

Donncha (1707 comments.) on October 24, 2008 at 8:25 pm.

Gofree – that’s normal, the files are created by your webserver.

Scott – once an hour should be fine.

Matt – I’ll have to investigate that!

Reply

Matt on October 24, 2008 at 8:58 pm.

Donncha, thanks a lot. It’s only minor, but somethings up. I have noticed it for the last few releases.

Cheers

Reply

Patrick Havens (4 comments.) on October 25, 2008 at 1:57 am.

Ok strange one. Since the update (and the host moved servers on me just about the same time, so it may be enter-related) I noticed that cache files aren’t listed as being made. The totals stay at zero… even though it says its on.

Any clues on what to look for?

Reply

Pat (1 comments.) on October 25, 2008 at 3:17 am.

Great minds think alike, (or fools seldom differ)

I was thinking a little of both actually.

*snort*

-Pat

Reply

Donncha (1707 comments.) on October 25, 2008 at 8:46 am.

Patrick – check if your host is running in safe mode?

Reply

Richard Bui (9 comments.) on October 25, 2008 at 9:30 am.

Donncha,

Everything seems to work fine, except it doesn’t seem like my expired posts/pages are being deleted even though I have it set to delete every hour. Am I forgetting something? Great plugin!

Reply

mark k. on October 25, 2008 at 10:01 am.

Small suggestion… I know that the wp-cron api is not designed to do this easily, but at least for the daily option it might be nice to be able to set the exact time in which the garbage collection will run.

Reply

Donncha (1707 comments.) on October 25, 2008 at 10:12 am.

To debug the garbage collector:
1. Look in your logs, you should see the occasional wp-cron.php request.
2. Open wp-cache-phase2.php and add an error_log() (look up the PHP manual) to wp_cache_gc_cron() so you can see that the cron really is being called.
3. In the same file, add an error_log() after the wp_cache_writers_entry() check in wp_cache_phase2_clean_expired() which will tell you that the caching system isn’t locked.
4. If all else fails, look at prune_super_cache() in the same file and error_log() the parameters and/or the unlink() statements.
5. Check your error logs.

Reply

Patrick Havens (4 comments.) on October 26, 2008 at 3:37 am.

I’m running on a Dreamhost Private Server. Not running safe mode.

The major file change was that my root directory was changed from /home/username/.fileserver/ to just /home/username/

I’ve been checking permissions…

And trying to remember. Way back when I had to do a symlink. I wonder if it pointing wrong and its just stopped working with no warning. And what would be the correct?

Reply

Donncha (1707 comments.) on October 26, 2008 at 10:31 am.

Patrick – that’s probably it. Check the symlink points at the right place!

Reply

Patrick Havens (4 comments.) on October 26, 2008 at 9:39 pm.

The symlink was the trick. Too bad there wasn’t a way to delete the symlink on deactivating (or disabling) and recreating when activating. I actually tried deactivating, deleting and reinstalling, but I had to do it manually.

Then again, perhaps I had an unusual situation.

Reply

Mark (1 comments.) on November 14, 2008 at 10:16 am.

Hi,
Im having 2 weird problems that I cant quite figure out and was hoping that you could help.

1) I have noticed since installing this great plugin that when it is completely on (vs. half on), firestats and wordpress statistics no longer is showing accurate statistics. Pageviews go down completely as well as visits. My guess is that this has something to do with firestats tracking the php files that are called vs. the html that is cached (Im obviously not an IT specialist ;-)
Is there any way to fix this so that firestats still works accurately

2) Everyonce in a while, my site shows nothing but a page full of really odd characters. It happened today and a reader complained and unsubscribed. Whenever that happens (only started since installing this great plugin, if I clean out the cache, it goes away. Do you know what might be doing that?

Thank you soo much in advance. I would be happy to donate to ya if you think you might know what is going on here. Thanks again,

Mark

Reply

Donncha (1707 comments.) on November 14, 2008 at 11:06 am.

Mark – the first problem is because those plugins rely on php code being executed on every request. That doesn’t happen when html files are served. Those plugins will have to be rewritten so they use Javascript to load a counter image. I should update the readme.txt with that..

I’m working on a fix for the second problem and about to check it in. I’ll post a link to updated files in a comment after this if you’d like to give them a go? The problem is that users are getting compressed wp-cache files, but for some reason the gzip headers are missing. I’m not sure why, but I think I’ve fixed the headers.

Reply

Donncha (1707 comments.) on November 14, 2008 at 11:11 am.

OK, grab http://svn.wp-plugins.org/wp-super-cache/trunk/wp-cache-phase1.php and http://svn.wp-plugins.org/wp-super-cache/trunk/wp-cache-phase2.php and copy them into your wp-content/plugins/wp-super-cache/ folder.

Hopefully you won’t see any more reports of corrupted pages.

Reply

Ricky (1 comments.) on December 8, 2008 at 10:57 am.

Please please please help me, I installed wp supercache, got and error that said Cannot load wpsupercache, tried to remove the plug-in and now my blog will not show up and I can’t see plugins or anything. Please help me.

Reply

Donncha (1707 comments.) on December 8, 2008 at 12:31 pm.

Ricky – remove the WP_CACHE define in wp-config.php. That should help, otherwise, look in your PHP error log.

Reply

Aofza (1 comments.) on December 12, 2008 at 7:00 am.

Thank you for wp super cache

Reply

Kalle (1 comments.) on December 28, 2008 at 3:29 pm.

Super Cache really speeds up the site, great plugin.

I’m wondering whether there is a statistics plugin that works with Super Cache, so that I can see all visits, even visitors who look at cached pages? If I understand correctly, this is not the case with FireStats that I am using at the moment.

Reply

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

@Kalle – Wouldn’t Google Analytics do the trick for you? It uses Javascript, so there’s no caching etc.

Reply

nick on January 22, 2009 at 7:42 pm.

I am having the same problem as Ricky “Cannot load wpsupercache” so I went into the wpconfig and there is not cache defined in there!

Reply

nick on January 22, 2009 at 7:47 pm.

Ok well now this plugin totally made my site blank.. what the heck did I do wrong?

Reply

Kenneth (1 comments.) on January 29, 2009 at 9:16 pm.

Did you get any errors before the site went blank?
And if there is no cache defined in the config I guess you could try adding it.
Add the following line:
“define(‘WP_CACHE’, true);” without the quotes.

BTW: Great plugin! Helps me drastically reduce the load time.

Reply

gazete gölbaşı (1 comments.) on June 26, 2009 at 12:43 pm.

Thank you for wp super cache

Reply

Kutti on July 15, 2009 at 2:57 pm.

Please please please help me, I installed wp supercache, got and error that said Cannot load wpsupercache
Thanks
Kutti

Reply

marcamillion (1 comments.) on October 28, 2009 at 6:06 pm.

I enabled this plugin, but then my complete site went blank.

Including my dashboard. How do I get my site back ?

I went into the folder, via FTP, and deleted the super-cache plugin folder, but the site is still blank.

What should I do?

Thanks.

Reply

Donncha (1707 comments.) on October 29, 2009 at 7:48 pm.

Read the documentation. It’s all you need to know!

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