Right now redis is used to both "cache" data and store jwt tokens in blacklist as a persistent store.
This means that redis is not really used as a cache, but rather as a persistent store.
What is needed:
cache requested data for faster API responses
reliable persistent storage for blacklisted jwt tokens
Possible solutions that I can think of right now:
use two separate in-memory stores: one is cache for frequently requested data (LRU cache) and a persistent store store for invalid blacklisted jwt tokens
use redis as LRU cache for both frequently requested data and blacklisted tokens, but also store blacklisted tokens in postgres database
Right now redis is used to both "cache" data and store jwt tokens in blacklist as a persistent store.
This means that redis is not really used as a cache, but rather as a persistent store.
What is needed:
Possible solutions that I can think of right now: