Skip to main content

Interface: RefsCache

Cache containing already synced models instances.

Extends

Methods

clear()

clear(): Promise<void>

Forget all models' instances.

Returns

Promise<void>

Inherited from

CacheI . clear

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>

Inherited from

CacheI . find

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>

Inherited from

CacheI . forget

Source

packages/core/src/types.ts:44


forgetAll()

forgetAll(type): Promise<void>

Forget all model's instances.

Parameters

type: string

Returns

Promise<void>

Inherited from

CacheI . forgetAll

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>

Inherited from

CacheI . put

Source

packages/core/src/types.ts:36