Get a sneak preview of WP Super Cache before 1.0!

WP Super Cache 1.0 will be out soon(ish) but I need testers to bang on the development version available on the download page.

This version should be significantly faster if you have a lot of mobile visitors, plus it adds support for https secure pages. The speed came about by saving those files as static files in the supercache directories rather than the old “legacy caching” of WP Cache. You’ll see files like index-mobile.html(.gz) and index-https.html(.gz) in those directories. Be aware that if you use a flat permalink structure the plugin opens the root supercache directory for reading to find the index* files. This may or may not be an issue with directories containing a very large number of directories (10,000+ for example).

HTTPS support is built into the mod_rewrite rules so those files are served by the web server directly, but PHP serves the mobile clients. Only now you’ll be able to cache many times more mobile pages than before. There’s negligible speed difference between PHP and mod_rewrite modes anyway in normal operation.

There’s also a handy little “donotcachepage” GET parameter now. Add that, giving it the value of a secret key from the Advanced settings page and the current page will not be cached in any way.

There is lots of new code in the plugin. It’s running fine here, and a few other people have had no problems but I need more feedback. If you have a development server please give this a go, and if it works ok I believe it’s good enough to go live, under supervision. Don’t go install it on a Friday afternoon…

With the upgrade to WordPress 3.2 I moved this site and my photoblog to a Multisite install so I’ve been looking at making Supercache work better in that environment too.

I also installed Varnish as a front end cache and woah, I’m impressed. Setup was fairly easy though it’s still not 100% right. When I make posts the following page is a blank page except for the blog title, and when I (as a logged in user) leave a comment I get a 500 error and wp-comments-post.php doesn’t redirect. I’m still trying to debug those issues. I mentioned this on Google Plus a few days ago but expect a follow up post on Varnish with docs in the near future.

Now all I need is traffic. I should blog more!

34 thoughts on “Get a sneak preview of WP Super Cache before 1.0!

  1. Darn. My 500 errors are caused by the Subscription module in Jetpack. Haven’t been able to track down why I’m getting the particular PHP fatal errors I’m seeing…

  2. Doncha,

    This is exactly what I’m looking for. My pages are way too slow without cache, but I had to disable because I also have a store. I’m using Cart66. They claim that all caching is incompatible with their plugin. Any word on whether 1.0 will work specifically with Cart66? Thanks.

    Roy

    1. Roy – unfortunately I’ve never used that plugin so I don’t know. Chances are if it didn’t work with previous versions it won’t work with this one but it should be possible for the devs of that plugin to cache as much as possible so it wasn’t slow..

    2. Arghh, just found cart66 last night and was gonna purchase today. Thanks for the heads up about this. Now it’s a definite no purchase, to bad…

  3. I’m a mite confused over this. The development version I downloaded a short while ago still carries version Version 0.9.9.9. Did I pick the wrong one? There was no selection of development builds.

    Peace,
    Gene

      1. Fair enough. But if you do more incremental updates before the final release, will I see that in my WP Updates panel, or should I look for those updates here?

        Peace,
        Gene

        1. As in updates to the development version? There won’t be updates on your dashboard until version 1.0 is released. You’ll have to just download the zip file, or if there’s anything significant I’ll probably leave a comment on this post.

  4. Hi Donncha,

    I’m curious. How did you solve the problem of a different cached site for mobile vs. desktop clients in combination of SuperCache with Varnish? How does your VCL look like?

    Cheers!
    -Marco

    1. From what I can gather Varnish doesn’t do much caching. It will I think serve stuff from the cache if the backend server doesn’t respond quickly enough which explains why I can use ab to fire 100 parallel requests at the server now. It also treats images and other static content as cacheable which helps too but because of the cache busting in WordPress I don’t think they’re cached very often.

      I didn’t do anything special to make it multisite aware however. The site feels faster, even as a logged in user so I’m happy. Then again my traffic has tanked in the last 6 months so it’s not particularly busy any more!

      1. From what I can gather Varnish doesn’t do much caching.

        Did you tell it to? Seems a bit silly not even to get it to serve static files — it’s so much faster than Apache even for that.

        1. Well, there’s no “caching = 1” setting but the configuration file is brimming with mentions of TTL and the bits I copied from elsewhere remove comments to make caching of static files better. It does cache. When I fire requests at it through ab none of those requests hits Apache so it is caching them. In testing with a logged out browser I think Apache served each request though. It does make a huge difference however and it was so easy to set up that everyone who has root on their own server should use it!

  5. @Donncha
    Totally awesome to see an update to the plugin. I used the older vs. in the past on a few sites and it worked great.

    Had a side question about Varnish.
    I just setup a new server and installed xCache. Is varnish used instead of xcache or in addition to it?

    sorry for the newb question, I am very new to all of this, but want to get the best possible setup that I can put together. My server is a colo and I am still learning about all of this stuff as I go.

    I can say that I am absolutely going to use the new super cache on the wp sites on this new server.

    1. xcache is a memory cache like memcached that you usually store variables and other data in. It’s basically like extra RAM storage for PHP.

      Varnish is a programme that sits in front of Apache. Visitors hit Varnish, if it has a copy of the page/item requested in cache then it’ll serve it, otherwise it asks Apache for it.

      They’re used for completely different reasons!

  6. This morning I checked in a few bits of new code – deleting the cache on a multisite network will only delete the cache for that blog. I added a new button, “Clear cache on all blogs” for super admins so they can clear the network’s cache completely! 🙂

  7. Hi,

    Please consider including this modification to the CDN functionality:
    http://devel.kostdoktorn.se/patches/wp-super-cache-persistent-cdn-v2.patch

    It makes the CDN URL rewrite persistent across the site. This avoids the same images being downloaded multiple times as currently happens if you use additional CDN CNAMES.

    (It uses SHA1 to compute a hash modulo for URLs to always use the same CDN CNAME.)

    Please contact me if you have any question!

    1. Varnish is a web server that sits in front of your stodgy old and slow webserver and caches frequently accessed pages and serves them at a horrendous speed! In this case Varnish and Apache 2 sit on the same server but Varnish has made my site noticeably faster, at least to me.

  8. Would it be possible to have a delete cache button/link in the admin bar on the front end? This would be really useful.

    Cheers.

  9. It would be great if you could add a message stating the cache has been cleared after one presses the clear cache button.

  10. A useful feature would be a a button or menu added to WP Admin Bar so you could reset the cache for the content being viewed on the front end of a site.

    Ironically had this today. With tropical storm Don spinning in the gulf of mexico. We post alerts from an WordPress emergency site far away. This is done via RSS, so I have two resets, one for the RSS transient and a second for WP Super Cache.

    I know I really need to cook something up with the dynamic tags, but this idea hit me as an easy hookable procedure for my users.

  11. Thanks for the update Donncha. I’m using WPTouch Pro for mobiles, and I believe that so far, those pages aren’t cached at all. When you talk about mobile support, what are you referring to? I don’t think that WordPress has native Theme/Template switching abilities, or maybe I missed it (?),

  12. hi,i only receive ‘completed’ mail ,not bot start and end while i seleted ‘ Less emails, 1 at the start and 1 at the end of preloading all posts.’ in preload mod.thank you.

  13. upgraded WP Super Cache to 1.0. The WP-Touch mobile plugin is acting up. Some posts show desktop version, some shows mobile version. I’m browsing using iPhone. I cleared my cache to start over. Stil same problem. Their “On/Off” mobile switch doesn’t work. This works perfectly prior to upgrading.

    1. Instead of using mfunc you’ll use the wpsc_cachedata filter to replace a tag or token left on the cached page. It’s a lot more secure than using the current way. That post goes into detail about it as well as linking to the example plugin I wrote. That demonstrates putting a tag on the page and then using the filter to replace it with the current server time.

Leave a Reply

%d bloggers like this:

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.

Close