Extension, Module

Archived
Forum
(read-only)

Stash

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Mark Croxton

     

If Enable Caching=yes then second page load blank

Support Request

jaseclamp
jaseclamp

I have a template using Stash that if I Enable Caching=yes then the second time I load the page its shows only a string like this:

{559987e3c106a4cc5ed57720ef3f34b21817001075}

I have EE 2.9.0 with latest version of Stash.

If I check the cache file itself its:

>cat e05ae18b28e19ee5d5b769456b27b6de+395920d313519a431b062a9c75f9919e
a:3:{s:4:“time”;i:1412039873;s:3:“ttl”;i:0;s:4:“data”;s:132:”{!—ra:000000001e1c6710000000006049f104—}{559987e3c106a4cc5ed57720ef3f34b21817001075}{!—ra:000000001e1c6711000000006049f104—}”;}

I’ve provided the templates below. They only contain stash tags, no other tags. I’ve also run debug in Template.php and that I know the template is being replaced with the string when the stash module runs in the process_tags function.

Here is my template. I really hope you can help as we’ve built our whole site around stash but are now trying to use page cache.

{stash:embed
name=“home”
file_name=“views:home”
}

========== views/home.html is ======>

<!doctype html>
<head>
<link rel=“stylesheet” href=”/assets/css/master.css”>
[removed][removed]
[removed][removed]
[removed][removed]
</head>
<body class=”{stash:_body_class} mb”>
<h1>TESTING</h1>
</body>
</html>

Mark Croxton
# 1
Developer
Mark Croxton

EE’s built-in template caching can’t capture the ‘setting’ of variables since that produces no output.

Stash has it’s own caching functions, and you can use Mustash to manage cache breaking.

For example:

{exp:stash:cache}

{
!-- your stash embed and code here --}

{
/exp:stash:cache} 

More on Stash caching

 

 

jaseclamp
# 2
jaseclamp

Thanks! I’ll check that out.