From 849586000a4aa1e31fa580208584264b5281dd44 Mon Sep 17 00:00:00 2001 From: Erik Hansen Date: Sat, 14 Oct 2017 15:48:58 -0500 Subject: [PATCH 1/2] Add clarification for what happens when you mark a block as cacheable=false - See https://magento.stackexchange.com/a/92973/2142 - See http://alanstorm.com/magento-2-full-page-caching-code-points/ - See \Magento\Framework\View\Layout\Element::isCacheable --- _includes/cache/page-cache-checklists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/cache/page-cache-checklists.md b/_includes/cache/page-cache-checklists.md index 6419c286168..5ded7e428b2 100644 --- a/_includes/cache/page-cache-checklists.md +++ b/_includes/cache/page-cache-checklists.md @@ -14,6 +14,6 @@ ## Non-cacheable page checklist - Use POST requests to modify Magento state (e.g., adding to shopping cart, wishlist, etc.) -- Blocks that can't be cached should be marked as non-cacheable in the layout +- Blocks that can't be cached should be marked as non-cacheable in the layout. However be aware that if you add a non-cacheable block to a page, that page will no longer be able to be cached in the full page cache. - Controllers that don't use layouts should set `no-cache` HTTP headers From efed4cabb44f8b60f690f3a0cf62bd915341c17f Mon Sep 17 00:00:00 2001 From: Erik Hansen Date: Mon, 16 Oct 2017 08:25:45 -0500 Subject: [PATCH 2/2] Clarify what happens when a block gets marked as non-cacheable --- _includes/cache/page-cache-checklists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/cache/page-cache-checklists.md b/_includes/cache/page-cache-checklists.md index 5ded7e428b2..7465e6c7478 100644 --- a/_includes/cache/page-cache-checklists.md +++ b/_includes/cache/page-cache-checklists.md @@ -14,6 +14,6 @@ ## Non-cacheable page checklist - Use POST requests to modify Magento state (e.g., adding to shopping cart, wishlist, etc.) -- Blocks that can't be cached should be marked as non-cacheable in the layout. However be aware that if you add a non-cacheable block to a page, that page will no longer be able to be cached in the full page cache. +- Blocks that can't be cached should be marked as non-cacheable in the layout. However, be aware that adding a non-cacheable block to a page prevents the full page cache from caching that page. - Controllers that don't use layouts should set `no-cache` HTTP headers