You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the in memory Caching sample, please add an explanation of how cache dependencies work. I've been trying to figure it out from the source code and debugger, and the Docs don't provide sufficient explanation:
using(varentry=_cache.CreateEntry(CacheKeys.Parent)){// expire this entry if the dependant entry expires.entry.Value=DateTime.Now;entry.RegisterPostEvictionCallback(DependentEvictionCallback,this);_cache.Set(CacheKeys.Child,DateTime.Now,newCancellationChangeToken(cts.Token));}
How does the child token above communicate to the parent token to evict and what is the purpose of disposing of the parent token? Is this a hack where the parent eviction only occurs because the already marked as expired parent gets evicted when the child cancellation triggers a remove expired entries search?
Second suggestion add to sample app a compatible version of this dependent cache entries construction because it makes more sense: aspnet/Caching#48
Additional
The sample app is MVC, not Razor Pages.
The topic is in need of a UE pass.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 13f5f8f9-18dd-9c12-9ed1-fcc6b44ba7fd
Version Independent ID: 640b4f36-5886-7b69-1c95-cfc8574a02fd
12 K PV/month
Moved from #6808
From @user135711 at #5495 (comment) ...
Additional
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: