Skip to content

@xtandard/lib/unstorage

withCache / createCache helpers on top of unstorage (peers unstorage, ohash).

import { … } from "@xtandard/lib/unstorage";
Name Summary
createCache Create a reusable cache instance that can be used as a decorator or wrapper.
withCache Wrap an async function with a persistent cache layer backed by unstorage. Supports functions with any number of arguments.
Name Summary
Cache
CacheOptions
WithCacheOptions
Name Summary
CacheMethodDecorator TC39 (stage 3) method decorator returned by Cache.decorator: caches an async method’s results.