cloudflare / cloudflare/pingora

Add RTCache::remove

Open
#473 1 comment 1 reaction 1 assignee Claimed by @Noah-Kennedy View on GitHub
enhancement WIP
Dominant language
Rust
Stars
27.4k
Forks
1.7k
Avg merge
6h 22m
Merged PRs (30d)
3

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.