Cache
@rotorsoft/act-root / act/src / Cache
Interface: Cache
Defined in: libs/act/src/types/ports.ts:1061
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โ
TState
The state schema type
Extendsโ
Propertiesโ
disposeโ
dispose:
Disposer
Defined in: libs/act/src/types/ports.ts:27
Inherited fromโ
Disposable.dispose
Methodsโ
clear()โ
clear():
Promise<void>
Defined in: libs/act/src/types/ports.ts:1070
Returnsโ
Promise<void>
get()โ
get<
TState>(stream):Promise<CacheEntry<TState> |undefined>
Defined in: libs/act/src/types/ports.ts:1062
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:1069
Parametersโ
streamโ
string
Returnsโ
Promise<void>
set()โ
set<
TState>(stream,entry):Promise<void>
Defined in: libs/act/src/types/ports.ts:1065
Type Parametersโ
TStateโ
TState extends Schema
Parametersโ
streamโ
string
entryโ
CacheEntry<TState>
Returnsโ
Promise<void>