Fundamentals of Redis for Caching — All You Need to Know as a Developer
Learn the most common use cases of Redis
Redis, which stands for Remote Dictionary Server, is an open-source in-memory data structure store that can be used as an in-memory key-value database, caching system, and pub/sub message broker. Redis is special in that all its data is stored in memory rather than on disk which makes it extremely fast and is a popular option for caching.
Redis is similar to Memcached, which as the name indicates is also an in-memory key-value data storage. However, Redis has more advanced features which makes it applicable to more scenarios. Unlike Memcached which only supports strings, Redis supports a variety of data structures including lists, sets, sorted sets, hashes, etc. Besides, Redis also supports snapshots, transactions, pub/sub, etc.
To start using Redis, you need a Redis server. For learning purposes, you can install Redis on your local machine or use a Docker container. For production purposes, you need to install Redis on a dedicated server or use third-party hosted Redis servers, such as GCP Memorystore for Redis or Amazon ElastiCache.
In this tutorial, we will install Redis on our local machine. If you are using Ubuntu, you can install Redis in this way: