Skip to content

Commit f7bd742

Browse files
authored
Update README.md
1 parent 0d2cebb commit f7bd742

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,24 @@
66

77
## Intro 👋
88

9-
Demo code of blog post from [https://sahansera.dev/distributed-caching-aspnet-core-redis/](https://sahansera.dev/distributed-caching-aspnet-core-redis/)
9+
This project leverages the IDistributedCache that's shipped as part of .NET/.NET Core SDKs to achieve distributed caching in a microservices environment. If you are looking for a monolithing caching approach, then, my [other project](https://github.com/sahansera/InMemoryCacheNetCore) would be more suitable for you.
10+
11+
I've also [blogged](https://sahansera.dev/distributed-caching-aspnet-core-redis/) this with a full explanation of how this is achieved.
1012

1113
> Note: I have recently migrated this project to .NET 6 and also a docker-compose.yaml for better dev experience 🎉 You can still access the old version from the [.NET 5 branch](https://github.com/sahansera/DistributedCacheAspNetCoreRedis/tree/dotnet5) in this repo.
1214
1315
## Architecture
1416

1517
![](https://sahansera.dev/static/f5cf079e725b11c30eb666b3ff414626/d7ceb/distributed-caching-in-aspdotnet-core-with-redis-1.png)
1618

19+
1. User requests a user object.
20+
2. App server checks if we already have a user in the cache and return the object if present.
21+
3. App server makes a HTTP call to retrieve the list of users.
22+
4. Users service returns the users list to the app server.
23+
5. App server sends the users list to the distributed (Redis) cache.
24+
6. App server gets the cached version until it expires (TTL).
25+
7. User gets the cached user object.
26+
1727
## Usage 🚀
1828

1929
Open up a terminal and run the following:

0 commit comments

Comments
 (0)