Ankur
Ankur

Reputation: 111

Magento query caching

How to cache the query result in magento if I am creating some module.

Basically I am creating one module for the announcement in which admin will add some announcement from the admin and it will be displayed on the front end(live website)

Now if the information entered though the admin is not dynamic so I want to cache the information while modifying(add, edit delete ) and show in front end. it will save my database query time

Upvotes: 0

Views: 2306

Answers (1)

clockworkgeek
clockworkgeek

Reputation: 37700

If you only cache the query result your block is still going to be generated every time. (Besides, MySQL already has a query cache)

It is better to cache the block output which saves even more effort for the server.
http://www.magentocommerce.com/wiki/5_-_modules_and_development/block_cache_and_html_ouput

Upvotes: 2

Related Questions