A simple multi-layered caching Redis pub sub implementation. Clients use memory cache and fall back to a cenetralized redis cache when the memory cache is not set. The clients also subscribe to redis to clear the memory cache should cache be cleared or set / updated.
- Install Redis for windows
- Install StackExchange.Redis
- Assign the connection string to redis section
-
~/cache
GET takeskey
as query param and returns the cached object if any. -
~/cache
DELETE takeskey
andbyPattern
as query params to delete a cache key or all keys matching the regex expression shouldbyPattern
be set to true. -
~/cache
POST takeskey
andminutes
as query params and an object as body content to set the cache.
- 2023-12-13: Initial release v1.0.0
This implementation was made for educational / training purposes only.
License is MIT
Birbia is coming