Skip to main content

AsyncCache

@iota/iota-sdk


@iota/iota-sdk / transactions / AsyncCache

Abstract Class: AsyncCache

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:31

Constructors

Constructor

new AsyncCache(): AsyncCache

Returns

AsyncCache

Methods

addMoveFunctionDefinition()

addMoveFunctionDefinition(functionEntry): Promise<{ function: string; module: string; package: string; parameters: object[]; }>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:87

Parameters

functionEntry

MoveFunctionCacheEntry

Returns

Promise<{ function: string; module: string; package: string; parameters: object[]; }>


addObject()

addObject(object): Promise<ObjectCacheEntry>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:57

Parameters

object

ObjectCacheEntry

Returns

Promise<ObjectCacheEntry>


addObjects()

addObjects(objects): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:67

Parameters

objects

ObjectCacheEntry[]

Returns

Promise<void>


clear()

abstract clear<T>(type?): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:42

Type Parameters

T

T extends keyof CacheEntryTypes

Parameters

type?

T

Returns

Promise<void>


delete()

abstract protected delete<T>(type, key): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:41

Type Parameters

T

T extends keyof CacheEntryTypes

Parameters

type

T

key

string

Returns

Promise<void>


deleteCustom()

deleteCustom(key): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:113

Parameters

key

string

Returns

Promise<void>


deleteMoveFunctionDefinition()

deleteMoveFunctionDefinition(ref): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:100

Parameters

ref
function

string

module

string

package

string

Returns

Promise<void>


deleteObject()

deleteObject(id): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:71

Parameters

id

string

Returns

Promise<void>


deleteObjects()

deleteObjects(ids): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:78

Parameters

ids

string[]

Returns

Promise<void>


get()

abstract protected get<T>(type, key): Promise<CacheEntryTypes[T] | null>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:32

Type Parameters

T

T extends keyof CacheEntryTypes

Parameters

type

T

key

string

Returns

Promise<CacheEntryTypes[T] | null>


getCustom()

getCustom<T>(key): Promise<T | null>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:105

Type Parameters

T

T

Parameters

key

string

Returns

Promise<T | null>


getMoveFunctionDefinition()

getMoveFunctionDefinition(ref): Promise<MoveFunctionCacheEntry | null>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:82

Parameters

ref
function

string

module

string

package

string

Returns

Promise<MoveFunctionCacheEntry | null>


getObject()

getObject(id): Promise<ObjectCacheEntry | null>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:44

Parameters

id

string

Returns

Promise<ObjectCacheEntry | null>


getObjects()

getObjects(ids): Promise<(ObjectCacheEntry | null)[]>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:53

Parameters

ids

string[]

Returns

Promise<(ObjectCacheEntry | null)[]>


set()

abstract protected set<T>(type, key, value): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:36

Type Parameters

T

T extends keyof CacheEntryTypes

Parameters

type

T

key

string

value

CacheEntryTypes[T]

Returns

Promise<void>


setCustom()

setCustom<T>(key, value): Promise<void>

Defined in: sdk/typescript/src/transactions/ObjectCache.ts:109

Type Parameters

T

T

Parameters

key

string

value

T

Returns

Promise<void>