3 ms·
Redis is normally not in memory. Everything is written to disk and survives a power failure. Memcached is just a cache. Don't store anything there you can't lo
by BurningFrog 12y ago
Redis is normally not in memory. Everything is written to disk and survives a power failure.
Memcached is just a cache. Don't store anything there you can't lose.
- tim333 12y agoNot sure that's quite right. From the docs: >In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.
- BurningFrog 12y agoWell, it's written to disk either way. You're right that if you do the "once in a while" setup, you can lose some data in a power failure. At a previous job people started using Redis thinking it was a fast in-memory data store. It turned out we had accumulated tens of thousands of records. I haven't measured, but I doubt it's much faster than Postgres. It does have other nice features. I like using the expiring records for caching.