On my new site i am displaying most of the images instead of text. I show images for recently written, recently viewed, mostly viewed posts etc. I found that in 40% of cases posts are same. so i need not to hit the DB to extract the image. It can save number of hits to Db & processing time.
I intially thought to cache post IDs. So before querying to DB or processing contents to extract image, i can search for post id into cache. If post id found in cache then i can directly show image from disk.
I found that there are many of the plugins who cache DB queries and their result. I am using wp-total cache. Please tell me whether it can fulfill my requirement or i should write my own logic
get_post_thumbnail()to get the featured images of the posts? Many of these API functions use an internal cache, so if you call them multiple times on the same page they only query the database once. Can you edit your question to include some example code? – Jan Fabry May 27 '11 at 14:26