|
|
|
|
|
by unqueued
1353 days ago
|
|
No, with JWT parsing it doesn't even have to look anything up, cached or otherwise. The JWT itself contains the information directly. I could have a server that doesn't have any access to the database at all, and it could still render content for the user. And if the server is for something critical, like purchases, it can still use redis on each request to verify that a JWT is still valid. |
|
> To give you an example, using a traditional session cookie model, whenever my server gets a request, it has to look up the associated session info, and then possibly join multiple tables
It does this on initial logon and then stores it in cache. You can think of a JWT as cache as well.
The point is, it only happens once for both.