modernice / goes

goes is an event-sourcing framework for Go.
https://goes.modernice.dev
Apache License 2.0
134 stars 12 forks source link

Snapshot on repository fetch #194

Open olpie101 opened 7 months ago

olpie101 commented 7 months ago

Would it be possible to have a snapshot on a repository read operation? I am aware that the current implementation writes snapshots on write. Additionally I am aware that there is a CachedRepository however, this approach would only really work for aggregates that don't change often as it doesn't check for a more recent version of the aggregate on fetch, unless we added additional logic to constantly invalidate the cache.