Function
cacheFor (obj, key) Object public
Module:
@ember/object
Defined in packages/@ember/-internals/metal/lib/computed_cache.ts:7
import { cacheFor } from '@ember/object/internals'; |
- obj
- Object
- the object whose property you want to check
- key
- String
- the name of the property whose cached value you want to return
- returns
- Object
- the cached value
Returns the cached value for a property, if one exists. This can be useful for peeking at the value of a computed property that is generated lazily, without accidentally causing it to be created.