WP Super Cache 0.9.1

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

Major changes under the hood in this release, and many bugfixes:

If your blog is installed in a folder then compare the mod_rewrite rules in your .htaccess with those on the admin page. I fixed a bug in how those are generated.

Out goes the shutdown function the plugin relied on for years (going back to the days of wp-cache), and in comes plain old output buffering on it’s own.

If you’ve had problems clearing the cache on your blog it could be because wp-cron isn’t firing. I’ve added checks for that. Joost helped me debug that and he blogged about it too. You’ll get a nice warning message if those checks fail.

If after all that, your cache still doesn’t clear, add $wp_cache_shutdown_gc = 1; to wp-content/wp-cache-config.php to clear the cache at the end of pageload instead of by wp-cron. It will slow down page generation for a tiny number of your users though.

The Last and Next garbage collection times are now in the timezone selected for your blog.

Added an admin notice on the plugin page to warn that caching has to be enabled. A warning is shown below the plugin activation row too.

If your site runs on a Windows server, I fixed a small problem with slashes and creating the config file.

The plugin created empty supercache folders, but that’s fixed now.

Bad Behaviour support seems to work nicely now!

You can now relocate the supercache plugins folder. See $wp_cache_plugins_dir in wp-cache-config-sample.php.

I added 2 new filters: wp_cache_served_cache_file in wp-cache-phase1.php (BB uses this) and wp_cache_file_contents in wp-cache-phase2.php where you can filter the contents of the newly created cache before it’s written out to a file.

The readme.txt has been updated too warning about using NFS to store the cache folder, solving wp-cron problems, added the list of Apache modules required for expired pages to really expire in the browser cache.

I also added a donation link in the readme.txt and on the admin page. You can hide it with the click of a button but if you’re feeling generous, I’d appreciate a donation.
I don’t expect many donations, that’s how these things work, but if you tell me your site does 100,000 page views a day and you couldn’t live without caching I might be slightly annoyed if you come looking for free support.

PS. Looks like Bad Behavior support is broken because the docs on the BB site were a little misleading and I don’t use the plugin. Grab badbehaviour.php and copy into plugins/wp-super-cache/plugins/ overwriting the file of the same name in that folder.

I haven’t been able to use Bad Behaviour in ages :-\ I don’t know if it’s my web host or something else, but it always slows down DB calls dramatically, so while browsing is fine, posting a blog entry, commenting, or creating/deleting a category can each take multiple minutes to go through.

Might try it again, but I still wonder if it’s something weird with my web host.

Thanks, I actually tried to install 0.9 yesterday and it shut down my site (http://2thumbgunslinga.com) after I turned in on. Just got blank screens then when I manually deleted it I couldn’t talk to any of my databases, wierd.

I had to work with my tech support to get it back up. I think its because I’m hosted on a Windows Server. I’d like to try again since you mention in this update you worked on fixes those hosted on Windows Servers. Is there any “Windows Server” specific tweaks I should do before I try this again?

Thanks again, I see how fast your site and those that use this plugin load so I really want to make this work. Great work!

Please excuse if I’m a bit dense here, but are the expired files on my admin page for WP SC the files that need to be cleared? Mine aren’t clearing on their own so is the best method adding the shutdown code (that you mentioned above) or should I try to get the WP cron to work?

Thanks Kenneth! It’s ok to have some expired files but if they don’t clear when the wp-cron is supposed to fire (at most every 30 minutes depending on your settings) then there might be a problem.
Did you get any warnings about wp-cron not working? Look at the Troubleshooting section of the readme.txt. It has a few suggestions for fixing things.

Secondly, I have been able to use WP Super Cache without any conflicts with other plugins until recently. There is a plugin called “Edit Comments XT” which allows a commenter to edit their comment for a short period of time. Unfortunately, when a user edits the comment, the old cached page is still served and the comment is not updated.

Is this a issue for the “Edit Comment XT” author or is it a current limitation with WP Super Cache? If it’s not a Super Cache problem, is their a way to edit the comment plugin to force a new cached page?

Thanks for your time and commitment in building such a great plugin Donncha!

That plugin should probably execute the “edit_comment” action when a comment is edited and saved. ie: do_action( ‘edit_comment’ );
This should only be necessary if the plugin interacts with the database directly though. Otherwise, the action should be called normally and the cache for that page refreshed.

Interesting, I am not sure the plugin executes the edit_comment action, but I am pretty sure it does access the DB directly. I’ll pass that info along to the plugin author and hopefully he will be as responsive as you have been.

Thanks for looking into that for me Donncha. I’ll be sure to send a donation your way when I receive my next Adsense payout!

I can’t get wp-cron to delete the garbadge so is there a way I can actually setup an real cronjob through the control panel? If so what would it be. If someone answers, i will just copy the text and paste it in my cron. Thanks 🙂

I enabled debugging and it am receiving emails saying “Cache Expiry cron job failed. Probably mutex locked” which I have never received prior to this build. I tried to do the steps in the readme file(changed sem_id, uncommented out use_flock, checked that the permissions on the mutex lock file were 644, etc) but have had no luck so far. Any ideas?

Browser caching thing is a 304 header which wp-super-cache doesn’t support, so I’m not sure why your blog shows it supports caching. Mine does too, so I need to talk to Alex and ask him about that. I’m surprised reverting to 0.9 changed that caching statement.

You could try disabling file locking. There’s hardly any need for it any more anyway since writes are done to temporary files now before renaming to the correct filename.

There are two different types of caching going on. WP Super Cache is server-side caching only – it saves your server from having to re-generate the page every time. ismyblogworking.com also checks for client-side (browser) caching via 304 Not Modified support – which saves your web browser from having to re-download the same content multiple times when reloading or navigating around a site).

I changed the messages on imbw to clarify this a little.

NB, browser caching/304 support is not always a significant benefit – it depends on the traffic patterns on your site.

well it was working great. now all of a sudden caching isn’t working at all and nothing on my end changed. the settings menu for wp-cache shows pages being cached, ismyblogworking shows as well but viewing source, every single page show a dynamic load.

I am having some problems when the plugin deletes the cache files since it does so at the time when my weblog is having many visits. So my server crashes as it attemps to re-new the cache files. I was wondering if there is some way to make this process happen only at nights or when the visits are low?

Bill – it plays nicely with most other plugins but sometimes updates don’t happen immediately because the other plugin expects to execute PHP on every request. The solution is to use AJAX to update dynamic parts of the page.

Unfortunately it doesn’t happen for everyone – I tried this blog and inphotos.org in browsershots.org and both worked ok.

inphotos.org didn’t work in IE6 with the plugin on or off, but ocaoimh.ie did work. It didn’t work in IE5.5 with the plugin on, but that’s a horribly old browser and I don’t have time to debug issues with that.

Thanks!
If I knew enough Apache, I could probably intercept IE6 in the .htaccess file and avoid the cache. Having the cache work for newer browsers is far preferable to no cache.
I will dig around and see what I can find.

Please remove my email from subscription to this comment list. I clicked on the manage your subscriptions link and it took me to a separate set of blog postings with no method for subscription management.

Leah – check the readme.txt. Under the FAQ section I added a note on this issue. Basically, don’t worry about it although by using the cacheability engine listed on that question I found your homepage wasn’t very cacheable at all. Try it without supercache to see if that makes a difference.

I just checked your site and the cache timestamp changed each time I reloaded the page which probably means a problem with your .htaccess rules. You should probably run the plugin in “half-on” mode. That’s only a small bit slower.

For those that are wondering why the recent updates of WP-SC stopped clearing expired pages, for me, it was upgrading past WP 2.7. I just upgraded to 2.8.6, and it works perfectly with Cache and Super Cache enabled.

The Golden Compass
First of a three part fantasy/sci-fi series. Some people hate it because of it's anti God message but it's a great read. I found it hard to put down. There's even a Snopes article about the film adaptation.

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.