Caching
Caching reduces repeated lookups for metadata, signing keys, configuration, and validation data.
Common Cache Targets
- Discovery metadata
- JWKS documents
- Tenant or application configuration
- Authorization policy data
Operational Guidance
- Cache JWKS but refresh it when validation sees an unknown
kid. - Keep configuration cache lifetimes short enough for operational changes to take effect.
- Monitor cache misses and refresh failures.
Common Pitfalls
- Caching signing keys forever.
- Using cache lifetimes that hide configuration changes during incidents.
Troubleshooting
- If a configuration update is not visible, inspect cache lifetime and invalidation behavior.