It was my understanding that Stash embeds are cached by default. I'm working on an ecommerce site where all template groups have EE templates similar to:
{stash:embed
name="file"
context="@URI"
file_name="views:file"
process="static"
}
(I've got process=static
in there but I've also got static cacheing turned off in my config for now. Will be looking at that part of things later.)
Each view file then contains code that looks like:
{stash:embed name="layouts:global"}
{exp:stash:set name="st_content"}Page content goes here{/exp:stash:set}
So I thought that I would need to escape the add to cart part of my product detail page with {stash:nocache}
. But when I add that tag to my page, my form disappears and instead I get [_Stash_1]
.
If I remove the {stash:nocache}
tags, the page appears as intended and then if I add products to the cart (which is also set up the same way and currently doesn't have any nocache tags in it), items get added to the cart successfully.
So my question is, am I misunderstanding how cacheing works with Stash or am I doing something else wrong and will I get tripped up somewhere if I didn't correct the cacheing set-up now?