1

Magento cache is used to speed up performance. The cached files is stored in var/cache.

My doubt is how cached files are retrieved and shown in frontend.

1 Answer 1

5

Nick Jones described how the cache works

Mage::app()->getCache() gives you a Zend_Cache instance, where you can do a lot of things:

save($value, $key, $tags = array(), $lifeTime=null)
load($key)
remove($key)
clean($tags = array()

Magento does different things:

Configuration, Layouts

It stores the parsed XML configuration and layout to avoid parsing the XML files again

Blocks HTML output

It stores the output of a block to avoid getting data and rendering HTML again (if configured so)

Translations

It parses the CSV files (and sort it through the different layers: Module translation, locale.csv) with the translation and stores it in cache to not parse it again

Collections Data

Magento can store collection data in cache, but afaik is this used nowhere...

EAV types and attributes

It retrieves the EAV attributes and does something with it, don't ask me wh at.

Web Services Configuration

The same as configuration: Parsing and merging xml files

EE: Page Cache

It stores the whole page output in cache to avoid rendering the complete HTML again

I hope this answers your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.