Class: Synapse::EventSourcing::CachingEventSourcingRepository
- Inherits:
-
EventSourcingRepository
- Object
- Repository
- Repository::LockingRepository
- EventSourcingRepository
- Synapse::EventSourcing::CachingEventSourcingRepository
- Defined in:
- lib/synapse/event_sourcing/caching.rb
Overview
Implementation of an event sourcing repository that uses a cache to improve performance when loading aggregates
Caching is not compatible with optimistic locking
Note that if an error occurs while saving an aggregate, it will be invalidated from the cache to prevent aggregates being returned from the cache that were not fully persisted to disk.
Instance Attribute Summary collapse
Attributes inherited from EventSourcingRepository
#aggregate_factory, #conflict_resolver, #event_store, #snapshot_policy, #snapshot_taker, #stream_decorators
Attributes inherited from Repository::LockingRepository
Method Summary
Methods inherited from EventSourcingRepository
Methods inherited from Repository::LockingRepository
Constructor Details
This class inherits a constructor from Synapse::EventSourcing::EventSourcingRepository
Instance Attribute Details
#cache ⇒ ActiveSupport::Cache::Store
12 13 14 |
# File 'lib/synapse/event_sourcing/caching.rb', line 12 def cache @cache end |