service/cache2
Api Code Documentation / Exports / service/cache2
Table of contents
Type Aliases
Functions
Type Aliases
Cache2
Ƭ Cache2: Object
Type declaration
Name | Type |
---|---|
eventsByStream | Map <StreamName , BusinessEvent []> |
globalPermissions | GlobalPermissions |
isWriteLocked | boolean |
lockQueue | ResolveFunction [] |
streamState | Map <StreamName , StreamCursor > |
Defined in
TransactionFn
Ƭ TransactionFn<T
>: (cache
: CacheInstance
) => Promise
<T
>
Type parameters
Name |
---|
T |
Type declaration
▸ (cache
): Promise
<T
>
Parameters
Name | Type |
---|---|
cache | CacheInstance |
Returns
Promise
<T
>
Defined in
Functions
getCacheInstance
▸ getCacheInstance(ctx
, cache
): CacheInstance
Parameters
Name | Type |
---|---|
ctx | Ctx |
cache | Cache2 |
Returns
CacheInstance
Defined in
initCache
▸ initCache(): Cache2
Returns
Defined in
invalidateCache
▸ invalidateCache(conn
): Promise
<void
>
Parameters
Name | Type |
---|---|
conn | ConnToken |
Returns
Promise
<void
>
Defined in
parseBusinessEvents
▸ parseBusinessEvents(items
, streamName
): Type
<BusinessEvent
>[]
Parameters
Name | Type |
---|---|
items | Item [] |
streamName | string |
Returns
Defined in
withCache
▸ withCache<T
>(conn
, ctx
, transaction
, doRefresh?
): Promise
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type | Default value |
---|---|---|
conn | ConnToken | undefined |
ctx | Ctx | undefined |
transaction | TransactionFn <T > | undefined |
doRefresh | boolean | true |
Returns
Promise
<T
>