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
I maintain an unconventional application, where our code is rendered many times within an iframe with different data each render. Because of this, using components within this space is also non-conventional, causing old data to be cached with the initial registering of the component on the first render.
clearing the component cache didn't work (is this a bug?), and I had to un-register the component before re-registering it (each time our app is rendered with new data).
My request, since the standard of unregistering a component before registering seems like a bad habit, is to have an option to disable caching for any such component registration. This could be an extra parameter (ko.components.register('foo', true)) or it could be an app level config. Either way, I think there are enough people concerned about the forceful caching of view model data as noted here.
That, or perhaps the nature of this request falls under the notion of allowing dynamic data within the component declaration. By nature, disabling the cache solves this problem as long as the app has some other mechanism to refresh on data changes. However, it seems the component design was oriented towards data that doesn't change, but maybe you have a better idea in mind to solve this.
Regards,
Matt
The text was updated successfully, but these errors were encountered:
I maintain an unconventional application, where our code is rendered many times within an iframe with different data each render. Because of this, using components within this space is also non-conventional, causing old data to be cached with the initial registering of the component on the first render.
clearing the component cache didn't work (is this a bug?), and I had to un-register the component before re-registering it (each time our app is rendered with new data).
My request, since the standard of unregistering a component before registering seems like a bad habit, is to have an option to disable caching for any such component registration. This could be an extra parameter (
ko.components.register('foo', true)
) or it could be an app level config. Either way, I think there are enough people concerned about the forceful caching of view model data as noted here.That, or perhaps the nature of this request falls under the notion of allowing dynamic data within the component declaration. By nature, disabling the cache solves this problem as long as the app has some other mechanism to refresh on data changes. However, it seems the component design was oriented towards data that doesn't change, but maybe you have a better idea in mind to solve this.
Regards,
Matt
The text was updated successfully, but these errors were encountered: