Current version of Magento 2 works with following types of Caches:
- Configuration (config) cache:
This cache appears when Magento gathers configuration from all its modules, merges it, and saves to the cache. Additionally, it includes store-specific settings from the file system and database. You should flush or clean this type of cache after changing configuration files. - Layout (layout) cache:
This consists of compile page layouts. This cache requires flushing layout files. - Block HTML output cache (block_html):
This one is about HTML fragmanets per each block. Clear this cache after changing the view layer. - DDL cache (db_ddl):
This is about database schema. It can be clean up automatically as well. It is posible to put any data in any segment of db_ddl cache. Cache should be flushed after custom changes to DB schema. - Entity-attribute-value (eav) cache:
This cache includes Meta-data related to EAV attributes.
Ex:
Store labels, search settings, attribute renderings etc. - Full page cache (full_page):
This occurs due to generate of HTML pages. It is automatically clean by Magento an can be modify by third party developers. - Translations cache (translate):
This consists of translations from all modules. - Integration configuration cache (config_integration):
This is related to compiled integration. Clean this after adding new integration or modifying existing ones.
Pre-requisites:
- Go to bin folder
> cd <amagento_root>/bin
- Go to bin folder
> cd <amagento_root>/bin
- To check the cache status:
> magento cache:status
> magento cache:status
- To enable / disable cache types
> magento cache:enable [cache_type]
> magento cache:enable [cache_type]
> magento cache:disable [cache_type]
- To clean the cache
> magento cache:clean [type]
- To flush the cache
> magento cache:flush [type]
Cache types:
layout
block_html
collections
db_ddl
eav
full_page
translate
config_integration
config_integration_api
config_webservice
No comments:
Post a Comment