10

I would like to get more clarity on Magento cache algorithm.

I referred

https://www.nicksays.co.uk/developers-guide-magento-cache/

http://www.demacmedia.com/magento-commerce/magento-tutorials/understanding-full-page-cache/

Still, when I look at var/cache folder I can see mage--0 to mage--9 and mage--a from mage--f.

  1. What are all they?
  2. What do they do?
  3. How do they do?

Can someone explain this concept?

1

In Magento we have the following cache types:

  • Configuration

  • Layouts

  • Blocks HTML output
  • Translations
  • Collections Data
  • EAV types and attributes
  • Web Services Configuration

Why we need Magento caching ?

Data caching store variable in the cache. Cache creates a system folder in which it records all data received by the user from the network. When a document is requested again, webpage shows the contents of the cache. With the help of it browsers have no need to download from the internet all page elements every time you visit it, but simply to "pull" the elements (such as text or graphics) that have changed. In simple words, that is how cache storage management works. Therefore:

  • Significantly faster loading of already visited pages.
  • Reduction of your traffic. So we need cache to increase usability and make our website faster.
| improve this answer | |
0

I'm not sure how much detail you want, but basically Magento will cache as much as it can, e.g.

  • Configuration XML files
  • Cached HTML
  • Session Data (technically not caching)

If you use the default 'file' value for storing cache, then it will store these values in the var/cache directory using Zend_Cache. These are the files you see there.

You can safely delete all these files, effectively clearing the cache, and Magento will regenerate them for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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