QueryGatewayCacheSource
open class QueryGatewayCacheSource<S : Any, D : Any>(snapshotQueryGateway: SnapshotQueryGateway<S>, val stateToCacheDataConverter: StateToCacheDataConverter<MaterializedSnapshot<S>, D>, val loadCacheSourceConfiguration: LoadCacheSourceConfiguration = LoadCacheSourceConfiguration.DEFAULT) : StateCacheSource<String, MaterializedSnapshot<S>, D>
Loads a snapshot by aggregate id through the gateway as a trusted in-process query: the cached value is shared by every caller, so it is loaded without any caller's scope or entry. Do not serve a scoped (for example HTTP) read from this cache; the caller's tenant, owner and space would not apply.
Constructors
Link copied to clipboard
constructor(snapshotQueryGateway: SnapshotQueryGateway<S>, stateToCacheDataConverter: StateToCacheDataConverter<MaterializedSnapshot<S>, D>, loadCacheSourceConfiguration: LoadCacheSourceConfiguration = LoadCacheSourceConfiguration.DEFAULT)