Full Page Cache products in multiple categories

Hey there everyone,

I have an issue I am trying to solve regarding caching. I have products that are in multiple categories and whichever one is visited first is the one that’s cached. When navigating to the same product but in a different category it is pulling the cached version and not from the current category it is in. This is leading to design errors and issues of that nature as we have some styling per category and if it’s pulling the cached category and not the category it’s currently in then the design gets all weird.

Would anyone either know how to check if the page is in the correct category you are navigating to so i can bypass the cache if(cached_page_category_id != requested_page_category_id) or if you can save the page cache based off the category id and pull based on the category id?

Thanks for all the help

submitted by /u/jdtaylor11
[link] [comments]