Skip to main content

Interface: CacheI

Cache containing already synced models instances.

Extended by

Methods

clear()

clear(): Promise<void>

Forget all models' instances.

Returns

Promise<void>

Source

packages/core/src/types.ts:56


find()

find(type, id): Promise<null | ModelInstance>

Retrieve a model instance from cache.

Parameters

type: string

id: ModelIdType

Returns

Promise<null | ModelInstance>

Source

packages/core/src/types.ts:27


forget()

forget(type, id): Promise<void>

Forget a model's instance.

Parameters

type: string

id: ModelIdType

Returns

Promise<void>

Source

packages/core/src/types.ts:44


forgetAll()

forgetAll(type): Promise<void>

Forget all model's instances.

Parameters

type: string

Returns

Promise<void>

Source

packages/core/src/types.ts:51


put()

put(type, id, instance): Promise<void>

Put a model instance inside cache.

Parameters

type: string

id: ModelIdType

instance: ModelInstance

Returns

Promise<void>

Source

packages/core/src/types.ts:36