Redis: Heavyweight Tags – an awesome use-case for caching with Redis

25 / Sep / 2012 by Mohd Farid 0 comments

Redis plugin provides a beautiful way to cache the html tags. Using this plugin we can make big savings on the time taken to render the gsp tags.

<redis:memoize  key="someKey" expire="3600" >
   //Some heavy weight tags rendering
  // Lots of db / network operations.
</redis:memoize>

I found this tag extremely helpful in rendering the public facing pages of our site. the pages which refreshed not very frequently and required few seconds to render(if done without caching).

The difference in the time taken to render the page is dependent on our choice of right candidate for Memoizing.


Hope this helps!!!

Best Regards
Mohd Farid
farid@intelligrape.com
@faridiflex

FOUND THIS USEFUL? SHARE IT

Leave a comment -