You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can have a cache key that's passed props and parcel.
Entire parcel data can be cached (is it safe to cache meta?).
Cache is cleared when cacheKey changes.
Can also have a valueFromProps and an onChange to interface with React via a standard parcel "controller"
How will this cache be reapplied? It makes more sense to cache the change buffer, but that's potentially huge, and would eventually involve serialising functions which adds the limitation that updater functions must be pure.
Caching the value is fraught with problems with derived fields, and would require a whole new kind of merge algorithm that picks pieces of "new" and "old" data. Caching the change buffer is more flexible, with two added downsides:
will take up more space in cache
will mean that modifier functions and updaters must be pure. They'll need to be pure so that they are serializable.
potentially could make a plugin to bring selected serializable scope into an updater if people really need it
We can throw the responsibility of serializing data onto the cache storage mechanism (probably react-cool-storage)
dxinteractive
changed the title
Add ParcelBoundaryHoc cache
Add: ParcelBoundaryHoc cache
Dec 5, 2018
Can have a cache key that's passed props and parcel.
Entire parcel data can be cached (is it safe to cache meta?).
Cache is cleared when cacheKey changes.
Can also have a valueFromProps and an onChange to interface with React via a standard parcel "controller"
The text was updated successfully, but these errors were encountered: