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
It would be really useful to have a simple mechanism to support caching. For example for SQL data that rarely changes but needs to be loaded often within the graph.
Thinking the r.model could be changed to support this with additional methods something like:
Thanks for the idea. Technically, I suppose this could already be achieved with query callback and then hacking into Objection lifecycle, but simplified first-class support could be worthy. I'll look into this.
Hi Ilya,
It would be really useful to have a simple mechanism to support caching. For example for SQL data that rarely changes but needs to be loaded often within the graph.
Thinking the r.model could be changed to support this with additional methods something like:
// return string | undefined
cacheKey = (context) => undefined;
// return existing data | query
preFetch = (context, query, cacheKey) => query;
// callback to potentially store in cache
postFetch(context, data, cacheKey) {}
With changes to the r.graph to support the above.
Keen to hear any thoughts.
Kind regards,
Matt
The text was updated successfully, but these errors were encountered: