Skip to content
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

Add RTCache::remove #473

Open
theduke opened this issue Nov 17, 2024 · 1 comment
Open

Add RTCache::remove #473

theduke opened this issue Nov 17, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request WIP We are working on this feature internally

Comments

@theduke
Copy link

theduke commented Nov 17, 2024

What is the problem your feature solves, or the need it fulfills?

The RTCache currently does not provide a way to remove keys.

My concrete need is pruning stale values and forcing a fresh lookup based on external events.

Describe the solution you'd like

Add RTCache::remove().

One design consideration is if a removal should interact with currently running lookups.
If a lookup is in progress, remove() may have unintuitive behaviour, because the key will be re-populated, but might still end up as stale because the lookup was started earlier.

The recommendation is to make the remove method async and wait for running lookups to finish by acquiring the lock.

@eaufavor eaufavor added the enhancement New feature or request label Nov 18, 2024
@eaufavor eaufavor added the WIP We are working on this feature internally label Nov 18, 2024
@theduke
Copy link
Author

theduke commented Nov 19, 2024

ps: happy to work on a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WIP We are working on this feature internally
Projects
None yet
Development

No branches or pull requests

3 participants