service/cache2
Api Code Documentation / Exports / service/cache2
#
Table of contents#
Type aliases#
Functions#
Type aliases#
Cache2Ƭ Cache2: Object
#
Type declarationName | Type |
---|---|
cachedProjects | Map <Id , Project > |
cachedSubprojectLookup | Map <Id , Set <Id >> |
cachedSubprojects | Map <Id , Subproject > |
cachedWorkflowItems | Map <Id , Workflowitem > |
cachedWorkflowitemLookup | Map <Id , Set <Id >> |
eventsByStream | Map <StreamName , BusinessEvent []> |
isWriteLocked | boolean |
streamState | Map <StreamName , StreamCursor > |
#
Defined in#
TransactionFnƬ TransactionFn<T
>: (cache
: CacheInstance
) => Promise
<T
>
#
Type parametersName |
---|
T |
#
Type declarationâ–¸ (cache
): Promise
<T
>
#
ParametersName | Type |
---|---|
cache | CacheInstance |
#
ReturnsPromise
<T
>
#
Defined in#
Functions#
getCacheInstanceâ–¸ getCacheInstance(ctx
, cache
): CacheInstance
#
ParametersName | Type |
---|---|
ctx | Ctx |
cache | Cache2 |
#
ReturnsCacheInstance
#
Defined in#
initCacheâ–¸ initCache(): Cache2
#
Returns#
Defined in#
invalidateCacheâ–¸ invalidateCache(conn
): Promise
<void
>
#
ParametersName | Type |
---|---|
conn | ConnToken |
#
ReturnsPromise
<void
>
#
Defined in#
parseBusinessEventsâ–¸ parseBusinessEvents(items
, streamName
): Type
<BusinessEvent
>[]
#
ParametersName | Type |
---|---|
items | Item [] |
streamName | string |
#
Returns#
Defined in#
updateAggregatesâ–¸ updateAggregates(ctx
, cache
, newEvents
): void
#
ParametersName | Type |
---|---|
ctx | Ctx |
cache | Cache2 |
newEvents | BusinessEvent [] |
#
Returnsvoid
#
Defined in#
withCacheâ–¸ withCache<T
>(conn
, ctx
, transaction
, doRefresh?
): Promise
<T
>
#
Type parametersName |
---|
T |
#
ParametersName | Type | Default value |
---|---|---|
conn | ConnToken | undefined |
ctx | Ctx | undefined |
transaction | TransactionFn <T > | undefined |
doRefresh | boolean | true |
#
ReturnsPromise
<T
>