Not only do I think that the Quick Cache Plugin for WordPress is the ultimate caching solution, I think it runs circles around the others. With the recent "auto-caching" feature and the pruning of the front page at the same time as a single page (when editing or publishing), it's even better. I know this because I was one of the beta testers.
Auto-Cache
If you have an XML Sitemap plugin creating a sitemap.xml file, it's easy. You just plug in the URL for it and the auto-caching feature uses it. If you don't, you can still put all of your URLs to be cached within the Quick Cache options panel, in the appropriate place of course.
The problem it defeats is the first page/slow load scenario by becoming the first visitor to that page. This is only for advanced users and there's a reason why: If it's not configured correctly along with the cache expiration setting, it can drive your bandwidth usage through the roof and would probably cause your CPU load to spike frequently.
I'm using it on this blog. I have the expiration setting at 86400 (24 hours) although I may end up changing it to two days. It takes hours for the first auto-cache pass to complete when there are more than 5200 URLs in my sitemap. In fact, I'm using it on three other, smaller blogs and 24 hours seems to be perfect for them.
This auto-cache feature replaces the secondary cache I developed using an additional plugin and a minute by minute cron job. It works basically the same way, except that it uses the built-in WP-Cron routines and cURL instead of file_get_contents().
Single Page/Post Pruning
Prior to the current version, you could choose what happened when a page or post changed or was published. Pruning could be a single page, the entire cache, or none. The built-in garbage collection routines run every hour and would take care of any expired pages or posts eventually.
A new option is to set it for Single + Front Page (or home page). This ensures the "index" page is pruned at the same time as any single page or post. That was my suggestion that the developers acted on. The reason is that search engine bots ALWAYS hit the front page at least once when they start crawling a blog.
It Isn't Perfect
No cache solution for WordPress is perfect. The only way to make it perfect is for WordPress to be rewritten with caching in mind, kind of like some popular forum software has been done.
Dynamic widgets and the PHP routines required by them will not work right with any form of caching unless they're changed to use JavaScript instead of PHP. When a page is cached, it caches the result of what all the PHP and database queries have produced – into a page which is as static as it can be.
There are hacks and other ways around the limitations, but none of them are perfect solutions to dynamic widgets and routines (like a popular pages widget which updates via PHP routines).
If plugin authors start taking cache limitations into mind when developing these cool plugins, we'll start seeing an end to slow first pages loads (on WordPress blogs, anyway) across the net.
Similar Articles:
- The Ultimate Cache Solution for WordPress on a Virtual Private Server
- Setting up NginX FastCGI Cache to work with WordPress
- A Good Reason to Turn Off the MySQL Query Cache
- A Secondary Cache for Quick Cache
- The Best Ways to Speed Up WordPress
This article is published as: The Ultimate Cache Solution for WordPress Just Got Better
Have you tried W3 Total Cache? It optimizes not just the caching and can be used in a simple or advanced mode. We are quite happy with it.
And don't forget, there are many other settings you have to adjust to have a fast website, not just the caching ;)
.-= My last blog: ERAP for President, again? =-.
Yes, I did. At one time or another, I have tried every caching plugin. I'm aware of the other settings and the only thing I can't do is offload images, css, etc. to a CDN. It just isn't in my budget.
Great plug-in! I noticed the difference immediately! I was acively searching for a solution like this…thanks.
Nice plug-in man…this works like a charm.
.-= My last blog: Mario Kart DS =-.
My kids just learned how to use wordpress and I believe they will love this plug-in as I do too. Thanks for sharing…
.-= My last blog: Truths About Creating Residual Income Online =-.
Just installed this plugin today! I've used it before, but since most of my visitors are first time visitors anyway, there would have been no benefit in load times for them. I'm curious now to see how well auto caching would work.
If I understand it right though, instead of caches refreshing every 3600 seconds, would I have no choice but to have it set to to refresh every 24 hours instead since I have a lot of pages? Since certain widgets on my site update several times over the course of the day, this would seem counterproductive. Thanks for any insight!
The auto cache feature reads the xml sitemap (if you have the plugin installed) and caches those pages in five-minute increments (from 5 to 25 pages at a time so as not to flood the server). Let's say you have it set to auto cache 25 pages every 5 minutes. That maxes out at about 300 pages per hour. You can then set the cache expiration based on the number of pages divided by 300 to find how many hours it would take. Since I only auto cache my posts and static pages, it takes less than six hours to auto cache them all. I still have the expiration set at 24 hours because I don't use dynamic widgets.
Remember, you can set the cache to prune pages from the cache based on several parameters, the best (in my opinion) being the single page + home page. Dynamic widgets don't work well with any kind of caching, so you have to figure out if it's worth it to you. My popular posts widget uses two plugins: Google Analytics Dashboard and the Subzane (I don't remember the rest of the name). Since it fetches the data from an external source, my dynamic widget will be up-to-date when the cache expires for any particular page.
Thanks for the response! I have around 1000 pages of posts and pages, so basically I would need to set the expiration time long enough until all those pages are cached. It seems like overkill for my needs right now, but it's good to know I have this option now if I need it. I currently set my cache to expire every hour, which I think is a good middle ground. :-)