Store your application data in Redis
Redis is an in-memory data store that is open-source and can be used as an alternation for database, message broker, cache. Redis supports multiple data formats such as string, lists, sets, hashes, bitmaps, etc. Here in this article, I'm sharing an easy and simple way to use Redis as your data store in your application. In this sample code, we will store data as hashes that data is JSON serialized. You can install Redis on your machine or can use Azure Redis for Cache if you have an Azure account. In order to communicate with Redis, you need to use " StackExchange.Redis " NuGet package. Here are the things you need to do. Let's start with the interfaces. You need an interface for Redis Connection Factory which helps to create the Redis connection for your application. using StackExchange.Redis; namespace RedisDemo.Interfaces { public interface IRedisConnectionFactory { ConnectionMultiplexer Connecti...