> For the complete documentation index, see [llms.txt](https://note.levelcode.org/software-engineering-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://note.levelcode.org/software-engineering-notes/database/in-memory-redis.md).

# In-Memory (Redis)

* In-memory store
* Fast (because it uses memory instead of disk)
* Usually it is not used as the main datastore

While it is usually used for cache, but you can also use it for other stuff such as distributed locking (redlock).

To read more about redlock:

* <https://redis.io/docs/manual/patterns/distributed-locks/>
* <https://dev.to/lazypro/explain-redlock-in-depth-31jj>

(more about distributed lock later)
