Skip to content

Conversation

@jgoux
Copy link
Contributor

@jgoux jgoux commented Aug 15, 2024

We need a strategy to delete unused / old cached databases. We also need to delete cached databases if our ephemeral storage reach a threshold.

The strategy works on two metrics:

  • Disk usage: if the disk is 90% full, then we delete cached databases in old->newer order until we are back under the threshold
  • TTL: we delete the cached databases from the cache if they're older than 24 hours

We execute this strategy on every requests, but we save the last execution time to a file so the strategy is only applied once per hour.

@jgoux jgoux requested a review from gregnr August 15, 2024 11:03
@jgoux jgoux mentioned this pull request Aug 15, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants