We should remove IMemoryCache.Remove #162
Comments
@lodejard Will confirm if necessary. |
No, that would require too much dev bookkeeping to track all of the CTSs. There's nothing wrong with removing an entry by name. |
There are very few places where a remove needs to occur, so there is very little additional CTS. In the few places where it does need to occur, what the code is trying to do is remove what it has added. By removing via key it can also easily remove what is being readded at the same time. That's why the operation should be expire-what-i-added-before rather than remove-by-key. |
And IDistributedCache? |
Distributed cache and memory cache are different |
Though I think there is merit to this proposal, it would make IMemoryCache too difficult to use in the most common cases people are familiar with. |
(Plus, a massive API change.) |
To remove entries the supported scenario is to add a token (like a CancellationTokenSource) in he options of the entry.
The text was updated successfully, but these errors were encountered: