cache是一个很大的概念,涉及的内容方方面面,magento cache是基于zend的,如果你对zend cache理解很深的话,相信magento cache也不再话下,本篇文章着重介绍Flush Magento Cache 和Flush Cache Storage 两个按钮的区别;
为了理解这两个选项之间的区别,你要先了解一些东西如缓存如何在 Magento 中工作。特别是要能准确的理解ids 和 tagging。
实质上,"id"就是一个唯一的字符串用来标识高速缓存中的共享存储的记录。tagging是另一个字符串,用于对不同类型的应用程序缓存的数据进行分类。
在 Magento中,tagging主要用于区分了以下的几个缓存类型:
- Configuration (non-layout XML files)
- Layouts (all those XML files under app/design/…)
- Blocks HTML output (Page blocks like headers, footers and callouts)
- Translations
- Collections Data
- EAV types and attributes (reduces some database lookups)
- Web Services Configuration
请看magento中默认的缓存文件列表存储示例:
- $ ls var/cache/mage--0
- mage---1ef_DB_PDO_MYSQL_DDL_catalog_product_index_price_idx_1
- mage---1ef_DB_PDO_MYSQL_DDL_core_config_data_1
- mage---1ef_LAYOUT_0183D2D163E71FE45BB4CE3F4045A71BD
- mage---1ef_LAYOUT_0659E64C667F785D2436DB04EBCBEE12E
- mage---1ef_LAYOUT_088A9AF9EA75F3D59B57387F8E9C7D7A6
- mage---1ef_LAYOUT_0956CDEF59F213D48A2D1218CC2CD1E96
- mage---1ef_LAYOUT_1013A059DA3EFFB6F31EB8ABA68D0469E
- mage---1ef_LAYOUT_12D7604E9632FF8D14B782A248FCBD2E7
- mage---1ef_LAYOUT_14E2F46FB273D9CEA54FDD1B14EB28645
- mage---1ef_LAYOUT_16CD0CCB23CB5ABE6844B7E3241F0A751
- mage---1ef_LAYOUT_1DC0705D40BBC39A32179EE8A85BEF5D7