Conversation
|
Looks good. Solves my usages of observes, for example playing a video element on a data change. |
|
This should be a decorator? |
|
@BryanCrotaz no, this is meant to be a low-level API only. Decorators like |
|
Couple minor typos in the first line of the usage section: |
Co-Authored-By: Scott Ames-Messinger <scott@commoncurriculum.com>
|
We discussed this in todays core team meeting, and are moving it into final comment period. Time to read through it again! 😸 👓 🤓 |
snewcomer
left a comment
There was a problem hiding this comment.
I really like this RFC and well written. Some of the low level primitives that have been exposed recently have been immensely useful. So along the same track, this seems like a great idea!
Co-authored-by: Robert Jackson <me@rwjblue.com>
rwjblue
left a comment
There was a problem hiding this comment.
Let's remove the isCache API for now (if we have a use case that comes up later, we can definitely add it).
Co-authored-by: Robert Jackson <me@rwjblue.com>
|
For historical reference: I was momentarily worried that this RFC doesn't provide an easy way to check whether a computation is const without creating unnecessary garbage. This problem isn't semantic: it's not a semantic problem to create a @pzuraq persuaded me that the current spec allows this implementation: the implementation could check to see if the computation is This whole thing only matters if the cost of storing the cache momentarily is a notable cost. If it turns out to be a serious issue, and @pzuraq's thinking turns out to be wrong, we could always revisit this issue. |
|
FYI - @pzuraq created a polyfill for this that works back to ember-source@3.13 (going further back is very very difficult since autotracking in general is missing). Check it out https://github.com/ember-polyfills/ember-cache-primitive-polyfill |
Rendered