@xtandard/lib/unstorage
withCache / createCache helpers on top of unstorage (peers unstorage, ohash).
import { … } from "@xtandard/lib/unstorage";Functions
Section titled “Functions”| 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. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
Cache |
|
CacheOptions |
|
WithCacheOptions |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
CacheMethodDecorator |
TC39 (stage 3) method decorator returned by Cache.decorator: caches an async method’s results. |