Skip to content

getCache

getCache(cache): KV

Defined in: packages/iso-filecoin/src/utils.js:280

Get cache instance from cache config

ParameterTypeDescription
cacheCacheCache config

KV

import { getCache } from 'iso-filecoin'
import { MemoryDriver } from 'iso-kv/drivers/memory.js'
// use default memory driver
const cache = getCache(true)
// use custom driver
const customCache = getCache(new MemoryDriver())