Prevent expired keys from needing to be written to disk (TTL support)

Open
#6 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

The payload names no source files, so start from the cache's eviction-to-disk path and the HybridCachePolicy::WriteOnEviction setting in foyer. Read the linked StorageFilter::filter docs and foyer issue 983 first, since the issue says this work depends on that upstream change. Done when entries whose TTL has expired are not written to disk on eviction, which needs a way to see expiry at filter time.

Written by the indexing model from the issue text.

Description

With foyer's HybridCachePolicy::WriteOnEviction data whose TTL has expired need not be written to disk when being evicted from memory cache.

Depends on https://github.com/foyer-rs/foyer/issues/983 as the currently-available filtering mechanism is based around entry size and current IO stats https://docs.rs/foyer/latest/foyer/struct.StorageFilter.html#method.filter

Dominant language
Rust
Stars
622
Forks
18
Avg merge
17h 8m
Merged PRs (30d)
35

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from s2-streamstore/cachey

All issues in s2-streamstore/cachey

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.