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

1 Answer 1

  • /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...)

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.