ComputedProperty#volatile()

volatileEmber.ComputedPropertypublic

Defined in packages/ember-metal/lib/computed.js:165

Call on a computed property to set it into non-cached mode. When in this mode the computed property will not automatically cache the return value.

It also does not automatically fire any change events. You must manually notify any changes if you want to observe this property.

Dependency keys have no effect on volatile properties as they are for cache invalidation and notification when cached value is invalidated.

let outsideService = Ember.Object.extend({
  value: Ember.computed(function() {
    return OutsideService.getValue();
  }).volatile()
}).create();

Returns:

Ember.ComputedProperty
this
doc_EmberJs
2016-11-30 16:48:51
Comments
Leave a Comment

Please login to continue.