SessionCacheConfig
Configuration for the read cache of a BufferedSessionService.
The cache assumes this service makes every change to the sessions it caches: until an entry expires, a hit misses changes made elsewhere, such as app: and user: state another instance changed or a session the store deleted. A hit does not wait for buffered writes, so it can show events the store does not hold yet, or never will if their write fails, after which a read goes to the store. The sessions an unfiltered BufferedSessionService.getSession returns share their events and state values with the cache, and a hit can differ from what the store returns, such as in event order, event ids or fields the store does not keep.
Types
Fluent builder for SessionCacheConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.
Properties
The most sessions cached at once, 1024 by default; past it, the session read least recently is dropped.
How long a session stays cached after it is read from the store, 5 minutes by default; Duration.INFINITE disables expiry.
Functions
Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.
Returns ttl in whole milliseconds, or Long.MAX_VALUE if it never expires (its getter is mangled for Java).