This project demonstrates how to implement a basic Redis-based cache service in ASP.NET Core using StackExchange.Redis.
- Connect to Redis using
StackExchange.Redis
- Generic cache service with
GetAsync
,SetAsync
, andRemoveAsync
methods - Easy integration into any .NET Core application
- Configuration from
appsettings.json
git clone https://github.com/Martik2002/RedisCacheImplementation.git
cd RedisCacheImplementation
To use the Redis cache in this project, you need to have a Redis server running. The easiest way is to run it in a Docker container.
If you haven't already, download and install Docker from:
👉 https://www.docker.com/products/docker-desktop
Run the following command in your terminal or PowerShell:
docker run -d --name redis-cache -p 6379:6379 redis