-
Notifications
You must be signed in to change notification settings - Fork 71
Prepare for ReadThrough mode #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
interface ICategory<'event, 'state, 'context> with | ||
member _.Load(log, categoryName, streamId, streamName, allowStale, requireLeader, ct) = task { | ||
match! tryReadCache streamName with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note this was not computing a correct key in the case of SlidingWindowPrefixed (fixed in #386)
interface Caching.IReloadableCategory<'event, 'state, 'context> with | ||
member _.Load(log, _categoryName, _streamId, streamName, _allowStale, requireLeader, ct) = | ||
interface ICategory<'event, 'state, 'context> with | ||
member _.Load(log, _categoryName, _streamId, streamName, _maxStaleness, requireLeader, ct) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably pragmatic, but seeing that every store implementation is ignoring the _maxStaleness
parameter has me wondering if this is the right interface 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other idea I have in that space is for the layers inward of the cache to have a LoadOrReload
signature with a origin: (token*state) voption
, rather than Load+Reload (should that be called Fetch
?). ICategory and ICategoryImpl ;)
#386 focuses on the implementation. This PR generalises surrounding functionality in preparation for this
IReloadable
interface for the cache to interact withsupersedes
store function used to compare cache entries to acompare
function that can also confirm an entry is identical (in order to be able to track when a cache entry has been successfully validated)allowStale
flag to be amaxStaleness: TimeSpan
(true
/false
becomesTimeSpan.MaxValue
/TimeSpan.Zero
)CacheEntry
type internalEquinox.Core.Tests
project)