Skip to main content

service/cache2

Api Code Documentation / Exports / service/cache2

Table of contents

Type Aliases

Functions

Type Aliases

Cache2

Ƭ Cache2: Object

Type declaration

NameType
eventsByStreamMap<StreamName, BusinessEvent[]>
globalPermissionsGlobalPermissions
isWriteLockedboolean
lockQueueResolveFunction[]
streamStateMap<StreamName, StreamCursor>

Defined in

src/service/cache2.ts:72


TransactionFn

Ƭ TransactionFn<T>: (cache: CacheInstance) => Promise<T>

Type parameters

Name
T

Type declaration

▸ (cache): Promise<T>

Parameters
NameType
cacheCacheInstance
Returns

Promise<T>

Defined in

src/service/cache2.ts:220

Functions

getCacheInstance

getCacheInstance(ctx, cache): CacheInstance

Parameters

NameType
ctxCtx
cacheCache2

Returns

CacheInstance

Defined in

src/service/cache2.ts:115


initCache

initCache(): Cache2

Returns

Cache2

Defined in

src/service/cache2.ts:84


invalidateCache

invalidateCache(conn): Promise<void>

Parameters

NameType
connConnToken

Returns

Promise<void>

Defined in

src/service/cache2.ts:250


parseBusinessEvents

parseBusinessEvents(items, streamName): Type<BusinessEvent>[]

Parameters

NameType
itemsItem[]
streamNamestring

Returns

Type<BusinessEvent>[]

Defined in

src/service/cache2.ts:495


withCache

withCache<T>(conn, ctx, transaction, doRefresh?): Promise<T>

Type parameters

Name
T

Parameters

NameTypeDefault value
connConnTokenundefined
ctxCtxundefined
transactionTransactionFn<T>undefined
doRefreshbooleantrue

Returns

Promise<T>

Defined in

src/service/cache2.ts:222