Tuesday 28 April 2009

Easy Cache Prizes

I made a simple change to the caching system for an easy 1% win. It turns out that all the Zend currency and locale libraries need to cache a lot of data. As I wrote before, Magento lumps in all cached data into one cache repository, making it more difficult to use the tag/attribute system, and generally find what you're looking for in the cache. By simply creating a new _localecache attribute of the App model, and passing it only to Zend Locale/Currency objects, we can get a quick speed up.

Separating out each major cache component into its own cache repository (directory) is the way to go. I just didn't expect it to be this easy.

No comments: