getCache
getCache(
cache
):KV
Defined in: packages/iso-filecoin/src/utils.js:280
Get cache instance from cache config
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
cache | Cache | Cache config |
Returns
Section titled “Returns”KV
Example
Section titled “Example”import { getCache } from 'iso-filecoin'import { MemoryDriver } from 'iso-kv/drivers/memory.js'
// use default memory driverconst cache = getCache(true)
// use custom driverconst customCache = getCache(new MemoryDriver())