Chip's Quips
A tiny spark of wit for a highly flammable world

WordPressed for cache?

June 14th, 2006 5:52:02 pm pst by Sterling Camden

After adding caching to my OPML Blogroll widget for WordPress, I realized that my Tag Cloud widget could also benefit from caching. After all, it requires a database SELECT and quite a bit of array and text processing to build that tag cloud, and the cloud only changes when I add or edit a post. So, I did that.

Then it occurred to me that widget developers might benefit from having a template for a cached widget, which they could copy and modify for their own content. Any time creating the content requires more processing than just spitting out HTML, caching should be considered, unless of course the content has to be up-to-the-second fresh to be meaningful (e.g., the decline in either the Microsoft stock price or President Bush’s approval rating).

So, I developed just such a template, which you can download from Chip’s Tips. That topic also includes brief instructions on how to modify the template for your own use.

Happy caching, and may all your page loads be quick.

Posted in Blog Blog, Coding...OK?, Too Oh!, Wildly popular | 5 Comments » RSS 2.0 | Sphere it!

RSS feed | Trackback URI

5 Comments »

 
MyAvatars 0.2

[...] Cached Widget – template widget for caching widget content [...]

 
MyAvatars 0.2

[...] Cached Widget – template widget for caching widget content [...]

 
MyAvatars 0.2

[...] Cached Widget – template widget for caching widget content [...]

 
MyAvatars 0.2

[...] Cached Widget – template widget for caching widget content [...]

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Subscribe without commenting

Better Tag Cloud