Preload the cache in WP Super Cache

See that nice dip in the graph for this week? I started to preload the cache used by WP Super Cache last Sunday and it’s made a noticeable difference in the load on my server here. The big spike is the preloading process.

I’ve always discouraged users from preloading the cache (Askapache Crazy Cache will do this for any cache plugin), mainly because of the possible problems so many files will cause for hosting companies. If you have thousands of cache files, it’s going to take so much longer to recover from a disk crash.
On the other hand, Google will now be using speed as a metric for judging how “good” a website is. In the past this plugin ignored the pages visited by bots because the bots only visited each page once so caching a page after the fact was pointless. The page, all pages, have to be cached first before Google ever visits.

That’s what it looks like. Once you start preloading it launches a wp-cron job to fetch 100 posts, then schedules another job 10 seconds in the future to fetch another 100 posts until it finishes. It also disables garbage collection of old pages, but making comments or posts will still clear out the appropriate cached files.
It only caches single posts right now. It may not be worth caching archive or tag pages because many sites already tell bots to ignore those pages as the server is doing less work it will serve those archive pages more quickly anyway.

The preloading only works if you’re using the plugin in Supercache or “ON” mode. It’s still a work in progress but has worked fine here. As well as the preloader the development version of the plugin has:

  1. Better support for mobile plugins.
  2. A cache tester.
  3. Can be configured to only delete the page a comment is left on, rather than the front page and associated pages.
  4. Works in WordPress 3.0.

It also has a number of bug fixes and other features added too.

I need testers though, so grab the development version from the download page. Install it and please leave feedback here or preferably on the support forum.

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 and funny videos to explore too!

Leave a comment

133 Comments.

  1. +1 Kena’s request. I dunno about tag pages but I’d really like to see category pages cached, at least at the top level if the categories are nested.

    If it’s too complex and stops you adding other cool stuff then it’s not a deal-breaker. If the category pages are that popular then the 1st one there can take the hit.

  2. Thx. I missed that Preload-Feature a lot. Now I dont need to use a Link-Checker any more to get all my pages cached. :)

  3. It is probably me, but I’m having a problem getting WP Super Cache Preload Cache to work. Every time I click ON and then Update, it disables Preload. Then, if I enable Preload and set the time to 30 minutes, and hit Update Settings, Preload appears to switch ON to HALF ON. Hence, only 3 pages have been cached (and I’m surprised and don’t know how that many got through). Note that I’m using WP 3.0.

Leave a Reply

[ Ctrl + Enter ]

Trackbacks and Pingbacks:

Holy Shmoly! is Digg proof thanks to caching by WP Super Cache