Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Cache issue when using "abstract" partials #257

lperrin opened this Issue · 1 comment

3 participants


I'm using partials to render a tab pane:

<div id="my-tab" class="tab-content">
  <div class="tab-pane active">
    {{> tab1}}
  <div class="tab-pane">
    {{> tab2}}

Now, if I do:

$('#my-tab').mustache({}, {
  tab1: '<p>Tab 1 - version A</p>',
  tab2: '<p>Tab 2 - version A</p>'

And then later:

$('#my-tab').mustache({}, {
  tab1: '<p>Tab 1 - version B</p>',
  tab2: '<p>Tab 2 - version B</p>'

I still get version A because the template has been cached. If that's not a proper use of mustache, it should be explained in the doc because this behaviour wasn't obvious to me until I read the code.

A fix would be to include partials in the key definition of the cache.


We are hitting the same issue I believe. Worked fine in 0.6.0, but in 0.7.0, I seem to be getting the same cached content each time.

@mjackson mjackson closed this in 658f9e0
@prathe prathe referenced this issue from a commit in prathe/punch
@prathe prathe Restrict mustache version. Fix laktek/punch#25
which is related to janl/mustache.js#257. Thanks to @jbourassa for
digging this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.