WordPress Super Cache 0.1

It’s time to lift the veil of secrecy on my latest project. With help from friends who diligently tested and reported bugs on this I can now present version 0.1 of WP Super Cache!

It is an extensive modification of the famous WP-Cache 2 plugin by Ricardo Galli Granada. This plugin creates static html files that are served directly by the webserver as well as the usual WP-Cache data files. It also goes one step further fixing a couple of bugs, adding some hooks and new features and making WP-Cache more flexible.
From the plugin page, here are some of the major changes and updates:

  • A plugin and hooks system. A common complaint with WP Cache was that hacking was required to make it work nicely with other plugins. Now you can take advantage of the simple plugin system built in to change how or when pages are cached. Use do_cacheaction() and add_cacheaction() like you would with WordPress hooks. Plugins can add their own options to the admin page too.
  • Works well with WordPress MU in VHOST or non-VHOST configuration. Each blog’s cache files are identified to improve performance.
  • Normal WP-Cache files are now split in two. Meta files go in their own directory making it much faster to scan and update the cache.
  • Includes this WP-Cache and protected posts fix.
  • Automatically disable gzip compression in WordPress instead of dying.
  • As Akismet and other spam fighting tools have improved, the cache will only be invalidated if a comment is definitely not spam.

If your server is struggling to cope with the traffic your site gets this plugin could be just right for you. If your site regularly gets hit by spikes of traffic like a digging or slashdotting it’s definitely the right choice, and even for everyday use, you may very well notice your webserver is a little bit more responsive.

I contacted Ricardo last week and sent him on an earlier copy of the plugin but I haven’t heard from him yet however. I’d love to know what he thinks of my modifications!

Update! this post has been dugg, please digg it and we can really test the cache out!

Nov 6th: WP Super Cache 0.2 is out! I think all the bugs mentioned below are now fixed. I applied Tummbler’s patch (from Elliott and Reiner) that enables gzip compression of the WP-Cache data files and fixes feed content types.
Please note: PHP’s internal zlib compression must be disabled for this to work. Look in your php.ini for the zlib.output_compression and zlib.output_compression_level directives and comment them out by placing a “;” at the start of each line.

Check the plugin page above for the download link.

Comments

comments

225 Replies to “WordPress Super Cache 0.1”

  1. Thanks for the good work. I was running WP-Cache fine with GZIP mod, but with Super Cache I get the “save the page” prompt in Firefox. How come GZIP works for me flawlessly with the mod WP-Cache but Super Cache makes Firefox prompt to save the page?

    This shows the compression issue it’s not with the server configuration (again WP-Cache modded to serve GZIPed pages was working flawlessly), but with Super Cache.

    Any ideas are very welcome, I really want to use Super Cache but need compression.

  2. Hi Doncha,
    Thanks for the great plugin.

    I have a slightly off-topic question, but I saw your post about memcached on wordpress.org.

    I using the object cache -> memcached replacement files from http://dev.wp-plugins.org/browser/memcached/trunk and I’m not sure how to set the memcached cache to expire. I’ve tried adding an expiry in wp-config but that isn’t working.

    Do you know how to reset the expiry time of the cache? I’ve got memcached working via a slave server but nothing I try works to expire the cache.

    Thanks again!

  3. elio – you set the cache time when you call wp_cache_set/add/update, otherwise the default is used. Can’t remember where that default is, but it’s an hour AFAIR.

  4. Hi Donncha,

    WP Super Cache is a great plugin, I use it since I set up my blog.

    But I found cache the whole pages is not aways that necessary, so I write a new cache plugin WP Widget Cache, which can cache the output of blog widgets. I think it’s a plus for WP Super Cache, and will significantly reduce the cost for WP Super Cache to cache new pages, especially when Google is crawling the site.

    Here’s the plugin url:
    http://wordpress.org/extend/plugins/wp-widget-cache/

    Looking forward to hear you thoughts.

  5. Hi,
    I have been kindly left (had dumped on me) a website which has started displaying an error “Parse error: parse error in /html/news/wp-content/plugins/akismet/.wp-cache.cache.php on line 1”. I am a software developer but I have no experience in PHP and I am unsure of where to start.

    If you could provide any pointers as to what the problem might be that would be greatly appreciated.

    Thanks in advance.

    1. Declan – delete the file or move it out of the way, that shouldn’t be in the akismet directory. Your site may have been hacked. Look for the WordPress Exploit Scanner to do a scan.

      1. Hi,

        As a temporary measure I rename the akismet directory and the problem has gone away. I will investigate further as to security of site.

        Thanks for your help.

Leave a Reply