Open kiastorm opened 4 months ago
This is working great for server data - but in my usecase I am fetching data in the client loader that I also want to cache. Below is some rough code of what I'm trying to do - is this possible?
export async function clientLoader(args: ClientLoaderFunctionArgs) { const cache = await cacheClientLoader(args, { type: 'swr', }) if (cache.whiteboards) { console.log(cache) return cache } const { serverLoader } = args const server = (await serverLoader()) as {} const whiteboards = await getAllLocalWhiteboards() return { ...server, whiteboards, } }
This is working great for server data - but in my usecase I am fetching data in the client loader that I also want to cache. Below is some rough code of what I'm trying to do - is this possible?