Open JosephSilber opened 9 years ago
This looks like the function that does it to me: https://github.com/yyx990803/vue/blob/bf8e37188fc622d976ce5f2a48cdfc2c1c4e07d7/src/instance/scope.js#L215
http://vuejs.org/guide/computed.html#Computed_Property_Caching
There is an example for disabling the caching if it doesn't work for your computed value:
computed: {
example: {
cache: false,
get: function () {
return Date.now() + this.msg
}
}
}
Specifically, how it calculates its dependencies:
If at first
this.bar
istrue
, how does it know thatfoo
depends onboom
?Does it re-collect its dependencies every time it runs?