graphprotocol / graphprotocol/graph-node

[Feature] Implement a way to clean up the call cache

Open
#4,503 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement indexer experience Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Description

Currently, we only ever write to the call cache, but never remove unneeded entries from it. The call cache can grow quite large, and removing unneeded entries from that will help keep its size in check.

We already have a table call_meta that tracks how long ago a cache entry was last accessed. We should add an internal job that periodically removes entries that haven't been used in a while.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Contributor guide

Open the 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.

Research direction

Start by locating the call-cache implementation and the call_meta table, then trace how cache access timestamps are recorded. Determine where an internal periodic job belongs and how an unused-entry threshold should be applied. Done means old, unneeded call-cache entries are removed periodically and the cache size is kept in check.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.