Super Cache for the Weekend

WP Super Cache 1.0 came out several months ago and while it worked fine for most people there’s always room for improvement and bug fixes. Here are some of the bug fixes and improvements coming in the next version which I plan on releasing next week.

There are a lot of changes there so if you have a self hosted blog I would really appreciate if you download the development version, wp-super-cache.zip and install it in your plugins folder.

  • Use $_SERVER[ ‘SERVER_NAME’ ] to create cache directories.
  • Only create blogs cached directories if valid requests and blogs exist.
  • Only clear current blog’s cache files if navigation menu is modified
  • Added clean_post_cache action to clear cache on post actions
  • Removed garbage collection details on Contents tab
  • Added wp_cache_check_mobile cacheaction filter to shortcircuit mobile device check.
  • Don’t delete cache files for draft posts
  • Added action on wp_trash_post to clear the cache when trashed posts are deleted
  • Show a warning when 304 browser caching is disabled (because mod_rewrite caching is on)
  • New check for safe mode if using less that PHP 5.3.0
  • Added wp_supercache_remove_cookies filter to disable anonymous browsing mode.
  • Fixed garbage collection schedule dropdown
  • Fixed preload problem clearing site’s cache on “page on front” sites.
  • Fix for PHP variable not defined warnings
  • Fixed problem refreshing cache when comments made as siteurl() sometimes didn’t work
  • Preloading of taxonomies is now optional
  • Domain mapping fixes.
  • Better support for https sites. Remove https:// to get cache paths.
  • Added AddDefaultCharset .htaccess rule back in and added an option to remove it if required.
  • Added multisite plugin that adds a “Cached” column to Network->Sites to disable caching on a per site basis.
  • Added WPTouch plugin to modify browser and prefix list in mobile detection code. Added support for that plugin’s exclude list.
  • Fixed cache tester
  • Filter the tags that are used to detect end-of-page using the wp_cache_eof_tags filter.

You might also like

If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos to explore too!

"Super Cache for the Weekend", 5 out of 5 based on 5 ratings.

31 thoughts on “Super Cache for the Weekend


  1. Looking forward to this, trying out the dev version as we speak! Quick question, does the “delete cache” button in the toolbar do a different function than the settings > wp supercache > contents > “delete cache on all blogs” button? Since 1.0, we haven’t been able to get the toolbar cache button to work in multisite whether we’re in site admin mode on a specific blog’s dashboard or whether we are in network mode …. the “delete cache on all blogs” button always works though …. any feedback appreciated! Thanks!


  2. Looking forward to the release. I’ve had similar issues as Trace. I think the top button only deletes the cache for the specific blog. Although, my issues go deeper that the cache for the Feed isn’t updating on new posts on my multi-site blogs. Once I clear the cache it does, but otherwise it’s not. Might be a configuration issue too I imagine.

    I’d love some more detailed info on best practices configuration for WP Super Cache too. It’s got so many options now that it’s hard to know the difference and what’s best for a specific configuration and I’m sure you know this info.

    Regardless, great plugin! Has saved me many times.


  3. Thank you Donncha, great news. Since well before your plugin version 1.0 (sounds as a typo cause the plugin had already so many new releases in the past :) I’ve been using WP Super Cache on 2 of my websites and the performance is I would say much better than with other plugins (which I at times test.) Will way till monday then. Nice weekend to all.


  4. It’s great that you are releasing a new version, I hope that it corrects an incompatibility issue that I discovered with Contact Form 7. I was getting failures to send mail with the form, how long this was going on I have no idea, a client alerted me to the problem, at first I thought it was the form plug in it’s self, but, it wasn’t. I then started the usual deactivation of plugins to find the conflict, the moment I deactivated WP Super Cache, the issue cleared up, so, sorry to say, it was WP Super Cache.

    Terry


          1. Oh yeah, sorry. Something like this code in wp-config.php:
            if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/contact-us/' ) !== false ) define( 'DONOTCACHEPAGE' );

            Change “contact-us” to wherever your contact page is.


  5. I have been testing progressive changes to the WP Super Cache trunk version with both WP 3.3.2 and WP 3.4 beta running on Windows Servers over recent months. Those changes have fixed a variety of problems that had made WP Super Cache 1.0 unusable without custom patches. I haven’t tested legacy mode, but mod_rewrite and PHP modes now both work as expected using a Windows Server with Apache 2.2.22 and either WP 3.3.2 or WP 3.4 beta.

    The one remaining frustration is that option selections are not persistent when WP Super Cache is deactivated and then re-reactivated. I understand why they are not from studying your code, but I think that is a rather serious flaw where someone can take down a site merely be deactivating and reactivating a plugin.

    Wouldn’t it be better to save user option selections in the database as metadata to avoid that problem? If there is some reason that is not apparent to me that makes that impractical, what about making it possible for users to save a persistent configuration file their theme directory? That would be a less desirable solution, because that file would have to be modified from time-to-time to remain compatible with future WP Super Cache versions changes, but that would be less of a problem that losing option selections each time WP Super Cache is temporarily deactivated.

    Thanks for all the work you have done on this. Your new version has been greatly improved compared to the previous release.

    -Bob


  6. Thanks Donncha, so it’s not in the admin panel on Super, good, I thought I might be getting senile in my old age and was not seeing it! LOL!

    If you place the code you mention in the config file, would it not get overwritten the next time WordPress upgrades?? I’m no expert, but that is my understanding of what could happen.

    I could also see adding the code as being problematic for some that do not know how to work with code, I know I could muddle through and get it done, but most users are not as advanced. I’m sure that most of the users of Super are of the “plug and play” type, the ones who just want a plugin to work without a lot of fussing with settings. Would it not be better to have an exclusion field in the admin panel where the page, or pages could be excluded as needed? I know that this would mean more work for you, but, it would give Super a clear advantage over the other cashing plugins. Contact Form 7 is extremely popular, just like Super, it makes sense to have these two plugins be compatable, just as making Super work with WP Touch.

    Just a suggestion……

    T.


  7. Now this is great news! I have been rolling out WP Super cache to all my sites and I must say it has been “pain free” and it just works!

    I just noticed that wp-minify which is listed in WP Super Cache’s recommended plugins is no longer available. Is there a suitable alternative?


    1. Unfortunately there aren’t any minification plugins I can recommend. They all seem to have their own problems and require careful configuration and watching as they break different things. :(


  8. Wow, this is awesome news! I am excited and a bit annoyed at the same time because just two days ago, I released a modified WP-Cache v2.1.2 on my brand new blog to enable caching and gzip to work together sensibly: instead of recompressing cached pages for every request with PHP or mod_gzip/deflate, compress once per page and save to disk. Now I’m going to ditch my work and try out your WordPress Super Cache, which is simply superior. :)

    Expect a pingback soon.

    /runs off to try this new toy

    Reply


  9. Another issue: I’m using Post Teaser to post the first part of an article on the home page (www.technightowl.com), with a Continue link to read the entire article. Unfortunately, your beta Super Cache doesn’t update the front page when it auto-posts (I schedule for Midnight server time for each new blog). I have to manually empty the cache in your plugin settings for the page to update. Is this something I can otherwise do without the manual labor?

    Is there a better plugin than Post Teaser?

    Peace,
    Gene


    1. Gene – I haven’t used Post Teaser but if it uses the standard publishing hooks and commands that WordPress provides it should clear the cache. Best thing to do is run the debug logger while publishing a post and see what happens in the plugin.


  10. Which level log do you want me to enable (I set 3, since it warned of heavy server loads otherwise)? It is a dedicated server, but would prefer to keep the load fairly normal.

    Any other settings you need?

    Peace,
    Gene


          1. Well, that won’t help. I’m not a programmer. And it happened again today, so I had to manually press the button to empty the cache in your setup panel.

            Peace,
            Gene


  11. Hello there,
    Uper Cache works perfect, excepting when I try to exclude a specific page. I just don’t get it…
    I want to exclude my contact form 7 page. (‘contact-studioprague’)
    Therefore I did the following:

    in wp-config.php at the end:
    if ( strpos( $_SERVER[ ‘REQUEST_URI’ ], ‘/contact-studioprague/’ ) !== false ) define( ‘DONOTCACHEPAGE’ );

    But then i get this error on the page itself:
    Warning: define() expects at least 2 parameters, 1 given in /home/regbond/public_html/_wpbox/wp-config.php on line 99

    WP: 3.4.2
    SuperCache: 1.2
    WP Installation subdirectory: _wpbox

    Please any hint. The contact form always gets in a loop (ajax) and no form can be sent…

    Thank you! Dan

Leave a Reply

Loading Facebook Comments ...