cachedCall executes the given async function and caches its result for subsequent calls. You can provide options for TTL, tags, custom key, key generator, or a custom cache instance.
cachedCall
options
Usage: const data = await cachedCall(fetchData, { ttl: 600, tags: ["users"] }, 123);
The async function to call if not cached.
Optional caching parameters.
Arguments to pass into the async function.
cachedCall
executes the given async function and caches its result for subsequent calls. You can provideoptions
for TTL, tags, custom key, key generator, or a custom cache instance.Usage: const data = await cachedCall(fetchData, { ttl: 600, tags: ["users"] }, 123);