I'm trying to find out how Magento 2 handles the storage of the response. I know that it stores the raw data in /var/page_cache/ folder, but I would like to know which part of the code handles the storage of a page?

I looked every file in the PageCache module with no luck. Could you point me into the right direction?

Page cache module: https://github.com/magento/magento2/tree/develop/app/code/Magento/PageCache

  • Do you use Varnish or php page cache? – KAndy Apr 15 '16 at 18:53
  • @KAndy php page cache – Roland Soós Apr 15 '16 at 21:02

PageCache module use Magento\Framework\App\PageCache\Cache class to work with cache. It's class extends Magento\Framework\App\Cache that is proxy of proxy for Zend_Cache_Core class


Try search in vendor\magento\framework\Cache\Core.php and vendor\magento\zendframework1\library\Zend\Cache\

  • Could you point the file in the repository which gets the whole response and tell the framework to cache it? I want to know where the full page cache gets the response and start the caching procedure. (I do not want to know how it goes into a cache file.) – Roland Soós Apr 15 '16 at 20:04
  • Magento\Framework\Cache\Core::save use parent method save (Zend_Cache_Core::save) – goral Apr 16 '16 at 21:04

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.