Optimizing/Caching Poll's Block

We all know that Poll is a core module which ships with Drupal. After installing this module we can setup poll and we can place a "most recent poll" block any where in region, usually its on a front page. I investigated this module and I found that it takes 20-25 queries to load most recent poll block and when a user submits a vote on that poll it does a cache_clear_all. Which was like WOW, in addition to submitting a vote users were also clearing my cached data. Optimizing or Caching poll's block for any kind of user (authenticated or anonymous) is like piece of cake, but figuring out how to do it was really a big pain in a neck.

Subscribe to Caching