-
Notifications
You must be signed in to change notification settings - Fork 779
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
HybridCache : implement the tag expiration feature #5781
Conversation
inviting @sebastienros and @jodydonetti from #5748 |
Hi Marc, not strictly related to tagging, but I'm looking at some code change in the PR and I spotted this xml comment regarding
When we touched on this subject some time ago I remember we agreed on the fact that inheritance (from per-call up to the All of this was because of the impossibility to express "undefined" or, to better say it, the impossibility to differentiate between Can you clarify what is the current rationale here? I'm asking for 2 reasons: first I'm interested in general, and second because as you know I'm creating a 3rd party implementation, and I'd like te observable external behaviour to be the same for both implementations. Thanks! ps: if you like I can open a different issue for this, just let me know. |
@jodydonetti thanks; added checklist item |
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=910739&view=codecoverage-tab |
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=911896&view=codecoverage-tab |
(note: this is a re-do of #5748 which went "a bit wrong" when rebasing)
Implement tag expiration in
HybridCache
The
HybridCache
system has a "tags" feature; rather than building a bespoke per-backend secondary index (like how the redis OutputCache backend works), here we move everything into the core library:DefaultHybridCache
, we maintain a map of tags (string
, note*
means everything) to expirations, and we track the creation time against eachCacheItem
Because the tag fetches are async, the data in the lookup is not
(timestamp)
, it isTask<(timestamp)>
Outstanding:
Microsoft Reviewers: Open in CodeFlow