HybridCache : implement the tag expiration feature#5781
HybridCache : implement the tag expiration feature#5781mgravell wants to merge 6 commits intodotnet:devfrom
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
HybridCacheThe
HybridCachesystem 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 eachCacheItemBecause the tag fetches are async, the data in the lookup is not
(timestamp), it isTask<(timestamp)>Outstanding:
Microsoft Reviewers: Open in CodeFlow