Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/capi/util/cache/base.ts>CacheBase

[WIP] A framework for crafting interactions with Substrate chains
Latest
class CacheBase
Abstract
import { CacheBase } from "https://deno.land/x/capi@v0.1.1-beta.1/util/cache/base.ts";

Constructors

new
CacheBase(signal: AbortSignal)

Properties

decodedMemo: Map<$.AnyCodec, WeakMemo<string, object>>
hasMemo: AsyncMemo<string, boolean>
rawMemo: WeakMemo<string, Uint8Array>
stringMemo

Methods

abstract
_getRaw(key: string, init: () => Promise<Uint8Array>): Promise<Uint8Array>
abstract
_has(key: string): Promise<boolean>
get<T extends object>(
key: string,
$value: $.Codec<T>,
init: () => Promise<T>,
): Promise<T>
getRaw(key: string, init: () => Promise<Uint8Array>): Promise<Uint8Array>
getString(
key: string,
ttl: number,
init: () => Promise<string>,
): Promise<string>
has(key: string)