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
-
~/cacheGET takeskeyas query param and returns the cached object if any. -
~/cacheDELETE takeskeyandbyPatternas query params to delete a cache key or all keys matching the regex expression shouldbyPatternbe set to true. -
~/cachePOST takeskeyandminutesas 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