Cache
@rotorsoft/act-root / act/src / Cache
Interface: Cache
Defined in: libs/act/src/types/ports.ts:1029
Cache port for storing stream snapshots in-process.
Implementations should provide fast key-value access with bounded memory. The async interface is forward-compatible with external caches (e.g., Redis).
Templateโ
The state schema type
Extendsโ
Propertiesโ
disposeโ
dispose:
Disposer
Defined in: libs/act/src/types/ports.ts:26
Inherited fromโ
Disposable.dispose
Methodsโ
clear()โ
clear():
Promise<void>
Defined in: libs/act/src/types/ports.ts:1038
Returnsโ
Promise<void>
get()โ
get<
TState>(stream):Promise<CacheEntry<TState> |undefined>
Defined in: libs/act/src/types/ports.ts:1030
Type Parametersโ
TStateโ
TState extends Schema
Parametersโ
streamโ
string
Returnsโ
Promise<CacheEntry<TState> | undefined>
invalidate()โ
invalidate(
stream):Promise<void>
Defined in: libs/act/src/types/ports.ts:1037
Parametersโ
streamโ
string
Returnsโ
Promise<void>
set()โ
set<
TState>(stream,entry):Promise<void>
Defined in: libs/act/src/types/ports.ts:1033
Type Parametersโ
TStateโ
TState extends Schema
Parametersโ
streamโ
string
entryโ
CacheEntry<TState>
Returnsโ
Promise<void>