Magento 2.x – Why There Are Cache and Page_Cache Folders

magento2

I am new to magento 2.x and was wondering to see that Magento 2.x has 2 folders for cache:

  • /var/cache folder
  • /var/page_cache folder

My question is that why there are 2 different folders?

Also what are differences among /var/view_preprocessed, /var/generation and /pub/static folders?

Please can anyone explain the differences and use of above folders?

Thanks in advance

Best Answer

  • /var/cache: Magento cache (config, blocks, etc...)
  • /var/page_cache: Magento full page cache (aka FPC)
  • /var/generation or /generated: Auto generated Magento code (Interceptors, etc...)
  • /var/view_preprocessed: Static contents before processing (like CSS and processed LESS files)
  • /pub/static: Public static files (like JS, CSS, HTML, etc...)
Related Topic