Is the cache global?
The `simple-cache-provider` is just a reference implementation though. It's somewhat naïve, e.g. it doesn't have invalidation strategy and just lets you replace the whole cache with a new one if you want to invalidate.
We'll publish more details on lower level API and how to write your own cache in the future.
export let cache;
function initCache() {
cache = createCache(initCache);
}
initCache();
export function createFetcher(fetch) {
const res = createResource(fetch);
return {
read(...args) {
return res(cache, ...args);
},
};
}