Skip to content

@sourceloop/cache / Exports / ICacheMixin

Interface: ICacheMixin<M, ID>

Type parameters

Name Type
M extends Entity
ID ID

Table of contents

Properties

Methods

Properties

getCacheDataSource

getCacheDataSource: () => Promise<DataSource | SequelizeDataSource>

Type declaration

▸ (): Promise<DataSource | SequelizeDataSource>

Returns

Promise<DataSource | SequelizeDataSource>

Defined in

types.ts:36


strategy

strategy: ICacheStrategy<M>

Defined in

types.ts:37

Methods

clearCache

clearCache(): Promise<void>

Returns

Promise<void>

Defined in

types.ts:38


generateKey

generateKey(id?, filter?): Promise<string>

Parameters

Name Type
id? ID
filter? Filter<M>

Returns

Promise<string>

Defined in

types.ts:39