Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

We should remove IMemoryCache.Remove #162

Closed
sebastienros opened this issue Mar 10, 2016 · 8 comments
Closed

We should remove IMemoryCache.Remove #162

sebastienros opened this issue Mar 10, 2016 · 8 comments
Labels

Comments

@sebastienros
Copy link
Member

To remove entries the supported scenario is to add a token (like a CancellationTokenSource) in he options of the entry.

@sebastienros
Copy link
Member Author

@lodejard Will confirm if necessary.

@Tratcher
Copy link
Member

No, that would require too much dev bookkeeping to track all of the CTSs. There's nothing wrong with removing an entry by name.

@lodejard
Copy link

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.

@Tratcher
Copy link
Member

And IDistributedCache?

@lodejard
Copy link

Distributed cache and memory cache are different

@Tratcher
Copy link
Member

@DamianEdwards

@Eilon
Copy link
Member

Eilon commented Mar 13, 2016

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.

@Eilon Eilon closed this as completed Mar 13, 2016
@Eilon Eilon added the wontfix label Mar 13, 2016
@Eilon
Copy link
Member

Eilon commented Mar 13, 2016

(Plus, a massive API change.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants