Replies: 2 comments
-
Postgres has a pretty descent query cache, so adding a redis or memcache layer to on the other hand, we have an architecture where the OAuth service is separate from the Resource, and the DBs are isolated, so we're making over-the-wire API calls to the |
Beta Was this translation helpful? Give feedback.
-
@lethunder did you find a good way to do a fallback lookup if the token doesn't exist in your database? @kmayer any tips on how you implemented your cache system? I'm trying to do something similar to @lethunder , and lookup a token at an alternative source if the default one shows up not found, as we want a fallback auth for some circumstances. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The idea here is to create the access token inside the DB and Redis at the same time. If the token is revoked then we update also attribute in redis. Since we are searching for this on every query, it would be faster to do this from redis instead on DB. The workflow would be:
- It does not exist
TOKEN DOES NOT EXIST
- It exists and not revoked
- We create entry in Redis DB
Beta Was this translation helpful? Give feedback.
All reactions