Skip to content

Commit

Permalink
Add slack mode documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
memowe committed Aug 20, 2018
1 parent e468a57 commit 61650f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/EventStore/Tiny.pm
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ Standard constructor. Understands all attributes as arguments. For most use case
A hashref representing the initial state. B<Default: C<{}>>
=item slack
See L</SLACK MODE> below.
=item cache_distance
The number of events after a new snapshot is cached for accellerated access. 0 means the cache is updated after each event. undef means the system does not use any caching. B<Default: 0>
Expand Down Expand Up @@ -322,6 +326,10 @@ Returns the internal L<EventStore::Tiny::EventStream> object that stores all con
Returns a cloned copy of the ininitial state all events are applied on, which was defined by L</init_data> as a hashref.
=head2 SLACK MODE
By default, L<EventStore::Tiny> is in strict mode. That means, that all L</snapshot> data is cloned to prevent the internal state from illegal modification. However, if you B<really know what you're doing>, you can activate L</slack> mode to get references to the internal (cached) state. This improves performance a lot, but has also the downside that it can break your data consistence. You really have to make sure, that you modify your data with events only!
=head2 OTHER
=head3 is_correct_snapshot
Expand Down

0 comments on commit 61650f2

Please sign in to comment.