-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@cached()
seems to cache across component instances
#7
Comments
Thanks for trying it out! Super glad that you have a use-case for it. 😍 Most likely you are doing everything right and I messed up. Admittedly I did not get to try this polyfill myself yet. 😅 I'll add a failing test case and fix. 👍 |
Fixed in |
I am still getting this issue in Not sure I can put this into a simple repro easily... but this is very cool... huge performance gains for a few critical use cases. |
Scratch that - I had an npm error I missed - was still running Thanks for this polyfill - hugely useful. |
Thanks for the work on this polyfill! I have been quite excited to try this out. However, it does not seem to work for me - the
@cached
value seems to be cached across all instances of a component.A simple usage of this:
However, multiple instances of the component all seem to share the same cached value. E.g.
groupedData is called
is only printed to the console once, even though there are multiple instances of the component rendered. I can also see this in tests, where in following tests the value is never recomputed, even though there are completely new component instances.Maybe I am also doing something wrong? Not sure! Also not sure if this is related to this addon or to some underlying functionality here.. Is it working for you?
For reference, I am on ember-source 3.20.4.
The text was updated successfully, but these errors were encountered: