Showing results for 
Search instead for 
Did you mean: 

Surrogate-Key on Product Page

Surrogate-Key on Product Page


Is it normal to have following keys on magento 2 product pages?

Surrogate-Key: cat_c c9 c18 c4 c201 c6 c206 c208 store cb cb_weltpixel_pre-footer cb_weltpixel_footer_v3 p98247 cat_p text

Due to these category keys entire product pages are flushed from fastly. Here is the debug report:

[: {"method":"GET","url":"http:/","invalidateInfo":"surrogate key: c18"} []
[2023-05-07T18:05:10.526065+00:00] report.DEBUG: cache_invalidate: 


Re: Surrogate-Key on Product Page

Hello @farrukhk 


Yes, it is normal to have Surrogate-Key headers on Magento 2 product pages. These headers are used by the Fastly CDN (Content Delivery Network) to identify which pages should be invalidated (purged) from the cache when changes are made to the products or categories.


The Surrogate-Key header contains a list of keys that correspond to the product and category pages that the content is associated with. When a change is made to a product or category, Fastly can use the Surrogate-Key headers to quickly and efficiently purge all related pages from the cache, ensuring that customers see the most up-to-date information.


In your case, it appears that the product pages are being invalidated due to changes in the "c18" category. This is expected behavior and is necessary for ensuring that the cache remains up-to-date. If you're experiencing issues with the cache being flushed too frequently, you may want to review your cache settings or work with a Magento developer to optimize your caching strategy.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Surrogate-Key on Product Page

Hi @theMageComp 

C18 cache invalidation is flushing all product pages having c18 surrogate key. In my case we have 2000 products in C18 and each product page has c18 as surrogate key. when this is flushed due to any reason, all 2000 product pages are flushed. 

C18 is only invalidated when a product from C18 goes out of stock etc (May be other reasons as well). This should not happen.

Product pages should not have C18 or for that matter any surrogate key from categories.

What I noticed is that if I disable a particular category using Enable Category option toggle button, the surrogate key is removed from the product pages.