Would Session.set with the same key-value pair invalidate previous computation?


#1

Using the example in Meteor doc,

<!-- in main.html -->
<template name="main">
  <p>We've always been at war with {{theEnemy}}.</p>
</template>


// in main.js
Template.main.helpers({
  theEnemy: function () {
    return Session.get("enemy");
  }
});

Session.set("enemy", "Eastasia");
// Page will say "We've always been at war with Eastasia"

Session.set("enemy", "Eurasia");
// Page will change to say "We've always been at war with Eurasia"

If I call Session.set("enemy", "Eastasia"); multiple times, would the template be re-drawed each time?


#2

No, it won’t. Source code here.