Session cache

Redis that stores active sessions and refresh tokens for the User API.

  • Why a cache: every authenticated request would otherwise need a database read. Sessions expire on their own through TTLs.
  • Revocation: logout and password changes delete the user's entries, so stolen refresh tokens stop working at once.
  • Loss: if the cache is lost, users must log in again. No account data is lost.
  • In prod: Amazon ElastiCache (module.redis), declared as instance redis in the deployment.

Edit ./docs/containers/session_cache.md to change this text.