-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(async): create new cache object for each instance by default #1241
fix(async): create new cache object for each instance by default #1241
Conversation
fix JedWatson#1236 Previously, the same object was being used by for async cache by default when no cache was passed to the component. This same object was used for every instance. Now, an object is used to determine if the default is being used and will create a new object for each instance in which no prop was passed.
We are having the same issue and need this change above? Is there a timeframe on this being available? Thank you @TheSharpieOne for fixing this |
@somsub as a workaround for now you can just specify your own cache on every instance:
Just make sure you somehow define that variable smartly enough that you do get a cache still, but not so broadly that the cache is shared across instances. |
D'oh! Sorry. This fell through the cracks on my end. |
Merged with a minor change to move cache prop setting from |
Thanks for merging @bvaughn. When will this be released for consumption from npm ? |
Not sure. I'm at Connect Tech right now (presenting) so I won't be making a release any time over the next few days> Jed or someone else might. |
@bvaughn is a release planned? Not having much luck building from sources and requiring locally to use the patched version. |
fix #1236
Previously, the same object was being used by for async cache by
default when no cache was passed to the component. This same object
was used for every instance.
Now, an object is used to determine if the default is being used
and will create a new object for each instance in which no prop
was passed.
If the user wants to have shared cache, they will need to opt-in by providing the same object to the component via the
cache
prop.