{"id":382967,"date":"2023-05-23T09:15:56","date_gmt":"2023-05-23T09:15:56","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=382967"},"modified":"2023-10-09T04:49:00","modified_gmt":"2023-10-09T04:49:00","slug":"how-to-check-page-is-loaded-from-cache-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/","title":{"rendered":"How to check Page is loaded from the cache in Magento 2"},"content":{"rendered":"\n<p>Hello friends, In this blog, we are going to check page is loaded from the cache in Magento 2.<\/p>\n\n\n\n<p>In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache, the &#8220;X-Magento-Cache-Debug&#8221; header will indicate whether the page is a cache hit or a cache miss. Here&#8217;s how you can check it:<\/p>\n\n\n\n<p>Open the page you want to check in your web browser.<br>Right-click on the page and select &#8220;Inspect&#8221; or &#8220;Inspect Element&#8221; to open the browser&#8217;s developer tools.<br>Go to the &#8220;Network&#8221; tab in the developer tools.<br>Refresh the page by pressing the F5 key or using the browser&#8217;s refresh button.<br>Look for the request corresponding to the page you&#8217;re inspecting in the list of network requests. It usually has the same URL as the page you&#8217;re on.<br>Click on the request to view its details in the panel below given in the screenshot.<br>In the request headers section, look for the &#8220;X-Magento-Cache-Debug&#8221; header.<br>If the &#8220;X-Magento-Cache-Debug&#8221; header has the value &#8220;HIT,&#8221; it means the page was loaded from the cache. If the value is &#8220;MISS,&#8221; it means the page was not found in the cache and was generated dynamically.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"481\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png\" alt=\"screenshot_1684821195684\" class=\"wp-image-382984\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-300x120.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-250x100.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-768x308.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1536x616.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684.png 1542w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Note that the presence of the &#8220;X-Magento-Cache-Debug&#8221; header may depend on your Magento 2 configuration and the cache system you are using. Make sure that the Full Page Cache (FPC) is enabled and configured correctly in your Magento 2 installation for this header to be available.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>How to Configure Full Page Cache in Magento 2?<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to&nbsp;<strong>Stores &gt; Configuration &gt; Advanced &gt; System &gt; Full Page Cache<\/strong>.<\/li>\n\n\n\n<li>&nbsp;Select the&nbsp;<strong>Caching Application<\/strong>:&nbsp;<em>Built-in Application<\/em>&nbsp;or&nbsp;<em>Varnish Caching<\/em>.<\/li>\n\n\n\n<li>Set the&nbsp;<strong>TTL for public content<\/strong>&nbsp;to define the timeout for the page cache. It is set to 86400 by default which is approximately 24 hours. After the time expires, page data is updated.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"596\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092-1200x596.png\" alt=\"screenshot_1684835543092\" class=\"wp-image-383106\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092-1200x596.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092-300x149.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092-250x124.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092-768x382.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092-1536x763.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684835543092.png 1546w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">How to verify using code?<\/h4>\n\n\n\n<p>To check if a page is loaded from the cache in Magento 2, you can use the following code in your custom Magento module or theme:<\/p>\n\n\n\n<p><strong>Create a block file named CacheCheck.php in app\/code\/Vendor\/Module\/Block<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nnamespace Vendor\\Module\\Block;\n\nclass CacheCheck extends \\Magento\\Framework\\View\\Element\\Template\n{\n    protected $cacheState;\n\n    public function __construct(\n        \\Magento\\Framework\\View\\Element\\Template\\Context $context,\n        \\Magento\\Framework\\App\\Cache\\StateInterface $cacheState,\n        array $data = &#091;]\n    ) {\n        parent::__construct($context, $data);\n        $this-&gt;cacheState = $cacheState;\n    }\n\n    public function isLoadedFromCache()\n    {\n        return $this-&gt;cacheState-&gt;isEnabled(&#039;full_page&#039;);\n    }\n}<\/pre>\n\n\n\n<p><strong>Create a template file for the block class (e.g., cache_check.phtml) in app\/code\/Vendor\/Module\/view\/frontend\/templates<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php if ($block-&gt;isLoadedFromCache()): ?&gt;\n    &lt;p&gt;&lt;b&gt;This page is loaded from cache.&lt;\/b&gt;&lt;\/p&gt;\n&lt;?php else: ?&gt;\n    &lt;p&gt;&lt;b&gt;This page is not loaded from cache.&lt;\/b&gt;&lt;\/p&gt;\n&lt;?php endif; ?&gt;<\/pre>\n\n\n\n<p><strong>Add the block to your layout file (e.g., default.xml) in app\/code\/Vendor\/Module\/view\/frontend\/layout<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;referenceContainer name=&quot;content&quot;&gt;\n    &lt;block class=&quot;Vendor\\Module\\Block\\CacheCheck&quot; name=&quot;cache.check&quot; template=&quot;Vendor_Module::cache_check.phtml&quot; \/&gt;\n&lt;\/referenceContainer&gt;<\/pre>\n\n\n\n<p>Once you have completed these steps, the block will be added to the content area of your page, and it will display a message indicating whether the page is loaded from the cache or not.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"596\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619-1200x596.png\" alt=\"screenshot_1684834639619\" class=\"wp-image-383098\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619-1200x596.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619-300x149.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619-250x124.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619-768x382.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619-1536x763.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684834639619.png 1546w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Note:<\/strong> This approach assumes you are using the built-in Magento Full Page Cache. If you are using a custom cache implementation or a different cache type, you may need to adjust the code accordingly.<\/p>\n\n\n\n<p>You can check if caching is working or not by simply running this curl command<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">curl -I -v \u2013location-trusted &#039;&lt;magento-website-url&gt;&#039;\nOR\ncurl -I &#039;&lt;magento-website-url&gt;&#039;<\/pre>\n\n\n\n<p>This will return headers as given below screenshots.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"171\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910-1200x171.png\" alt=\"screenshot_1684832857910\" class=\"wp-image-383084\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910-1200x171.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910-300x43.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910-250x36.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910-768x109.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910-1536x218.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832857910.png 1547w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1155\" height=\"189\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832635340.png\" alt=\"screenshot_1684832635340\" class=\"wp-image-383083\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832635340.png 1155w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832635340-300x49.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832635340-250x41.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684832635340-768x126.png 768w\" sizes=\"(max-width: 1155px) 100vw, 1155px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Hope this will help you in managing caching in your Magento 2 projects.<\/p>\n\n\n\n<p>You can get more magento2 (Adobe Commerce) articles <a href=\"https:\/\/webkul.com\/blog\/?s=magento2\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>Thanks \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello friends, In this blog, we are going to check page is loaded from the cache in Magento 2. In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache, the &#8220;X-Magento-Cache-Debug&#8221; header will indicate whether the page is <a href=\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":377,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[],"class_list":["post-382967","post","type-post","status-publish","format-standard","hentry","category-magento-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to check page is loaded from the cache in Magento 2<\/title>\n<meta name=\"description\" content=\"In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache ...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to check page is loaded from the cache in Magento 2\" \/>\n<meta property=\"og:description\" content=\"In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-23T09:15:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-09T04:49:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png\" \/>\n<meta name=\"author\" content=\"Rahul Chaudhary\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rahul Chaudhary\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\"},\"author\":{\"name\":\"Rahul Chaudhary\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/07d5b40e4a4b5c6996d171e134826b75\"},\"headline\":\"How to check Page is loaded from the cache in Magento 2\",\"datePublished\":\"2023-05-23T09:15:56+00:00\",\"dateModified\":\"2023-10-09T04:49:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\"},\"wordCount\":527,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png\",\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\",\"name\":\"How to check page is loaded from the cache in Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png\",\"datePublished\":\"2023-05-23T09:15:56+00:00\",\"dateModified\":\"2023-10-09T04:49:00+00:00\",\"description\":\"In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache ...\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684.png\",\"width\":1542,\"height\":618,\"caption\":\"screenshot_1684821195684\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to check Page is loaded from the cache in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/07d5b40e4a4b5c6996d171e134826b75\",\"name\":\"Rahul Chaudhary\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/40e957d926aaa241dc1de7dd09cfea4a0c86ed9fa29bb7eda51de1a8967864e7?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/40e957d926aaa241dc1de7dd09cfea4a0c86ed9fa29bb7eda51de1a8967864e7?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Rahul Chaudhary\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/rahulchaudhary766\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to check page is loaded from the cache in Magento 2","description":"In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache ...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/","og_locale":"en_US","og_type":"article","og_title":"How to check page is loaded from the cache in Magento 2","og_description":"In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache ...","og_url":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-05-23T09:15:56+00:00","article_modified_time":"2023-10-09T04:49:00+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png","type":"","width":"","height":""}],"author":"Rahul Chaudhary","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Rahul Chaudhary","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/"},"author":{"name":"Rahul Chaudhary","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/07d5b40e4a4b5c6996d171e134826b75"},"headline":"How to check Page is loaded from the cache in Magento 2","datePublished":"2023-05-23T09:15:56+00:00","dateModified":"2023-10-09T04:49:00+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/"},"wordCount":527,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png","articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/","url":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/","name":"How to check page is loaded from the cache in Magento 2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684-1200x481.png","datePublished":"2023-05-23T09:15:56+00:00","dateModified":"2023-10-09T04:49:00+00:00","description":"In Magento 2, you can check if a page is loaded from the cache by inspecting the HTTP headers. When a page is loaded from the cache ...","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/screenshot_1684821195684.png","width":1542,"height":618,"caption":"screenshot_1684821195684"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-check-page-is-loaded-from-cache-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to check Page is loaded from the cache in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/07d5b40e4a4b5c6996d171e134826b75","name":"Rahul Chaudhary","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/40e957d926aaa241dc1de7dd09cfea4a0c86ed9fa29bb7eda51de1a8967864e7?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/40e957d926aaa241dc1de7dd09cfea4a0c86ed9fa29bb7eda51de1a8967864e7?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Rahul Chaudhary"},"url":"https:\/\/webkul.com\/blog\/author\/rahulchaudhary766\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/377"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=382967"}],"version-history":[{"count":11,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382967\/revisions"}],"predecessor-version":[{"id":404354,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/382967\/revisions\/404354"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=382967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=382967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=382967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}