TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is there a Redis alternative that uses disk?

2 点作者 jotto超过 5 年前
Just need a key&#x2F;val get&#x2F;set.<p>Redis stores everything in memory. It uses the disk for snapshots, but what about using the disk when there&#x27;s not enough memory for storage? (memory is expensive)<p>Postgres works except it doesn&#x27;t reclaim disk space without a vacuum full (which requires a lock) so if you&#x27;re doing a lot of deletes, Postgres is impractical.

1 comment

nikisweeting超过 5 年前
Just set `vm-enabled yes` in your redis config and it will use virtual memory (aka disk) to store the actual values, while keeping as many keys as it can in-memory to ensure fast lookups.<p><a href="https:&#x2F;&#x2F;redis.io&#x2F;topics&#x2F;virtual-memory" rel="nofollow">https:&#x2F;&#x2F;redis.io&#x2F;topics&#x2F;virtual-memory</a>