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
cachedProjectsMap<Id, Project>
cachedSubprojectLookupMap<Id, Set<Id>>
cachedSubprojectsMap<Id, Subproject>
cachedWorkflowItemsMap<Id, Workflowitem>
cachedWorkflowitemLookupMap<Id, Set<Id>>
eventsByStreamMap<StreamName, BusinessEvent[]>
isWriteLockedboolean
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:325

Functions#

getCacheInstance#

getCacheInstance(ctx, cache): CacheInstance

Parameters#

NameType
ctxCtx
cacheCache2

Returns#

CacheInstance

Defined in#

src/service/cache2.ts:144


initCache#

initCache(): Cache2

Returns#

Cache2

Defined in#

src/service/cache2.ts:90


invalidateCache#

invalidateCache(conn): Promise<void>

Parameters#

NameType
connConnToken

Returns#

Promise<void>

Defined in#

src/service/cache2.ts:355


parseBusinessEvents#

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

Parameters#

NameType
itemsItem[]
streamNamestring

Returns#

Type<BusinessEvent>[]

Defined in#

src/service/cache2.ts:620


updateAggregates#

updateAggregates(ctx, cache, newEvents): void

Parameters#

NameType
ctxCtx
cacheCache2
newEventsBusinessEvent[]

Returns#

void

Defined in#

src/service/cache2.ts:526


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:327