A high-performance cache plugin for WordPress, and a plus for WP-Cache or WP Super Cache !
Why we need this WP Widget Cache?
WP Widget Cache can cache the output of your blog widgets. Usually it will significantly reduce the SQL queries to your database and speed up your site.
I think you’ve heard of WP-Cache or WP Super Cache, they are both top plugins for WordPress, which make your site much faster and responsive. Here is how cache works:
“caching WordPress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and the building the page from the database”.
If your site get a very high traffic, or you blog are hosted on a shared server, you do need cache. If you use widgets, you do need WP Widget Cache.
Why WP-Cache or WP Super Cache is not enough?
WP-Cache or WP Super Cache cache ‘page’, and WP Widget Cache cache ‘widget’ or your sidebar, that’s the difference.
Let me explain this more clearly:
If some of your page is very popular, and people keep visit this page, then the page cache will be very helpful. But what if the user click some link and visit another page of your blog, or Google is crawing your whole site? Cache another whole page? Actually that’s not necessary for most time. As we all know, WordPress share the same widgets, they’re all the same, maybe on all the pages of your site. For example, the Categories widget, this maybe never change, the Archives widget, maybe changes once a month. So it’s really really not that necessary to query the database again, especially when you use a lot of widgets.
WP Widget Cache is not to replace the WP-Cache or WP Super Cache, it’s a plus for them, as it reducing the cost for caching a new page. you can set the cache time for each widget individually, seconds to years, whatever you like. For Categories widget, days maybe fine, for Recent Comments widget, seconds maybe fine.
How effective it is?
That depends on how many and what widgets you use, for this site, the queries for home page reduce from from 69 to 19, that’s means 70% improvement.
Notice
There’re some widgets that should not be cached!!
Some widgets are dynamic, that means they show different content in different conditions, for example, for different pages, for login / unlogin users.
If you use such dynamic widgets, don’t worry, just left the cache expire time(see the screenshots) field empty or 0, which will prevent the WP Widget Cache to do anything.
Here’s a list of such widgets to be finished, if you know something new, just leave a comment here.
- Widget Logic
- MiniMeta Widget
- Calendar widget (WP Build-in)
September 2nd, 2010 on 8:53 pm
Hi Tim,
Thanks for telling me this, the issue will be fixed in the next version.
September 2nd, 2010 on 5:04 pm
Hey Andrew, i found a small bug. If you clear the Caches in the WordPress admin and there are no widgets cached you get a error.
Clear all widgets cache( Warning: Invalid argument supplied for foreach() in /…/wp-content/plugins/wp-widget-cache/inc/wcache.class.php on line 180 0)
Only a small mistake because there is no need to clear the cache of zero widgets ;)
A very nice plugin.
regard,
Tim
May 10th, 2010 on 2:20 pm
I was looking for a plugin like this, I had to take off severals widgets in my blog because they were using to much bandwidth in my limited hosting account. Thanks a lot.
February 25th, 2010 on 4:44 pm
Hi,
does 'wp widget cache' works with 'hyper cache'?
Michael
February 25th, 2010 on 11:29 am
decent!!
February 5th, 2010 on 12:25 pm
i wanted to change some settings in a widget and deactivated widget cache in order to see the effect of the changes – but it seems, that the widget doesn't get turned off in any way ??? i even deleted the plugin directory for widget cache, but alle the same: the changes in the widget don't show in the sourcecode of the page, instead i can still see the widget-cache tags in the source…
wp 2.9.1…….
January 28th, 2010 on 5:45 am
Works Ok for 2.9.1
January 27th, 2010 on 6:47 pm
Looks like a great plug-in, is there an updated version for WordPress 2.9?
January 17th, 2010 on 11:55 am
Im using wigdet cache with wordpress 2.9.1. I discovered, when widget cache is activated, it's not possible to manage the widgets like drag and drop. Maybe you can fix this?
January 10th, 2010 on 8:25 pm
I just installed WP Widget Cache on WP 2.9.1, and I can't find where to edit the expire time. I use an HTML widget to pull in feed information via javascript, so I want it to expire every 6 hours or so.
I tried the settings and the widgets pages, but there's no where to enter an expire time. If I can't see the form, is there a way to hardcode that cache timeout in the editor?
December 22nd, 2009 on 8:07 am
Great Plugin, my home went from 47 queries to 16!!!
November 13th, 2009 on 1:55 pm
Hi there,
There is a problem with wp version 2.8.0 to 2.8.6, after saving widget settings wp widget cache form is gone… while settings saved just fine, you'll need to reload the page to be able to configure it once again
October 24th, 2009 on 1:13 pm
How is varying by user level supposed to work? I tried enabling that and turning it on for the Meta widget thinking it would make a cached version for logged in users and a cached version for non-logged in users. That did not seem to work though. Is that how it is supposed to work?
September 8th, 2009 on 3:16 pm
Hi, I love this great plugin, was very sorry to see it won’t work with wp 2.8.3, 2.8.4…
Setting are not saved….
Is there any support to 2.8′s new widget framework ?
August 10th, 2009 on 3:38 am
Hi.
I’m using your WP-Plugin WidgetCache. Since WordPress 2.8.3 I recocnize some problems to administer the widgets in my blog. All drag&drop-functions on the wordpress-admin-site are deaktivated when using your WidgetCache 0.25.2. Deaktivating this Plugin makes all works fine again.
Maybe a bug in the Plugin-Source? Please have a look … Thanks.
August 4th, 2009 on 11:12 pm
Any plans to update the plug-in so that it’s compatible with WP 2.8.3? The current version appears to cause the Widgets admin page to no longer function.
July 22nd, 2009 on 1:55 am
I had to de-activate it because it wouldn’t allow me to add any widgets because I couldn’t scroll down the sidebar in order to drag the widgets in. Also I’m not sure what values to use for individual widgets. Can you leave them as default values.
July 14th, 2009 on 7:44 am
The best information i have found exactly here. Keep going Thank you
July 12th, 2009 on 10:07 am
Hey Andrew, in the next version of the plugin, could you add an option to clear the cache for all widgets in the top panel of the administration page. I’m talking about the drop down box right next to the top right where it says “Howdy, Username | Logout” which contain the default options New Post, New Page, Drafts, Comments.
June 21st, 2009 on 6:57 pm
Hi Mahesh,
I’m not sure why you want this, but there’s a way, on the widget setting page, there’s a delete link just near the expire time input box.
Regards,
Andrew
June 21st, 2009 on 1:48 pm
Andrew,
Your plugin rocks man!!
Is there a way to clean the cache selectively instead of cleaning the cache of all the plugins?
Thanks,
Mahesh
June 20th, 2009 on 6:54 pm
Thanks a lot mate. :)
June 10th, 2009 on 10:37 am
Well June,
You can check the sql request times, visit http://wordpress.org/extend/plugins/wp-widget-cache/faq/ for more details.
Or you can add some debug code yourself, that’s the most dependable way to make sure some widget is cached.
Here’s the debug code:
on the line 514 of widget-cache.php,
call_user_func_array($callback, $params);
this line is the real widget func, you can add a line before, out put some comments,like this: echo “<!–Do Widget Func–>” ;
Then you can see different pages having the same widgets, if this comment not output always, that’s means it’s cached.
Regards,
Andrew
June 10th, 2009 on 9:31 am
How can I test to see if my widgets are actually being cached? I change things but I can’t really tell a difference. Is there a testing method other than looking at stats?
June 9th, 2009 on 2:50 am
hi tehre. just wanted to point out, that there are quite a few questions open in the wordpress forums about your plugin, maybe yo ucan have a look at them too? http://wordpress.org/tags/wp-widget-cache
May 27th, 2009 on 9:43 am
Thanks for the fast reply buddy! Wish I could help with the testing, but my PHP skills are rather… nonexistent. :-D
May 27th, 2009 on 12:03 am
Hi Rishi,
I haven’t test wp 2.8 beta yet, I still look forword to a RC version. but I do notice the widget.php been changed a lot.
Regards,
Andrew
May 26th, 2009 on 9:06 pm
Hey Andrew,
When can we expect this plugin to be compatible with WordPress 2.8′s widget framework? The sole reason I’m holding back my site’s upgrade to the beta versions is because I love Widget Cache too much. :-D
May 23rd, 2009 on 6:31 am
Many of my widgets are called directly from a template tag in the sidebars. Is there any way I can cache these widgets using widget cache, as they don’t appear in the widgets admin side. (This was Also posted on WP.org)
Thanks.
May 9th, 2009 on 3:06 pm
thak you.
May 3rd, 2009 on 7:52 am
It’s the first time I commented here and I must say you share us genuine, and quality information for bloggers! Good job.
p.s. You have a very good template for your blog. Where did you find it?
April 18th, 2009 on 4:52 pm
Hi
Mashget – witch plugin you are using to put IMG in tuop left corner on your posts? How it is possible that you can zoomed in this IMG. – This plugin its realy awsome – can you share it?
regards
Lukas
April 15th, 2009 on 4:50 am
I got an AdSense widget on my sidebar which shows a list of ads by Google. I don’t think this great plugin will negatively affect the AdSense function, will it?
March 28th, 2009 on 7:26 pm
Hello!
Very Interesting post! Thank you for such interesting resource!
PS: Sorry for my bad english, I’v just started to learn this language ;)
See you!
Your, Raiul Baztepo