Hi Isomorphic,
I would like to ask you about your insights about our idea of how to work with cached dataSources.
We have dataSource with cachedAllData=true.
Calling invalidateCache will trigger fetch to server to get fresh data. Then DS will trigger refresh on all its components to make them show fresh data. This we call eager cache invalidation.
Then we had an idea of lazy cache invalidation.
Calling invalidateCache will only mark DS as invalid. Then later when we or data-bound component call fetch, DS will fetch fresh data from server depending on his state.
Lazy approach has advantage that we can call invalidateCache many times, but the server fetch will happen only when it is really needed.
Disadvantage seems to be, that we have to figure out when the component must ask DS for data (for example MenuButton should always call fetch when the menu gets opened).
SmartGWT framework seems to be supporting only eager invalidating. Or is there a way how to achieve also lazy invalidating?
We would be glad if you can give us some advices about this topic.
Regards,
Matus
I would like to ask you about your insights about our idea of how to work with cached dataSources.
We have dataSource with cachedAllData=true.
Calling invalidateCache will trigger fetch to server to get fresh data. Then DS will trigger refresh on all its components to make them show fresh data. This we call eager cache invalidation.
Then we had an idea of lazy cache invalidation.
Calling invalidateCache will only mark DS as invalid. Then later when we or data-bound component call fetch, DS will fetch fresh data from server depending on his state.
Lazy approach has advantage that we can call invalidateCache many times, but the server fetch will happen only when it is really needed.
Disadvantage seems to be, that we have to figure out when the component must ask DS for data (for example MenuButton should always call fetch when the menu gets opened).
SmartGWT framework seems to be supporting only eager invalidating. Or is there a way how to achieve also lazy invalidating?
We would be glad if you can give us some advices about this topic.
Regards,
Matus
Comment