InternalTokenCache¶
- class gafaelfawr.cache.InternalTokenCache¶
Bases:
TokenCache
Cache for internal tokens.
Methods Summary
get
(token_data, service, scopes)Retrieve an internal token from the cache.
store
(token_data, service, scopes, token)Store an internal token in the cache.
Methods Documentation
- get(token_data, service, scopes)¶
Retrieve an internal token from the cache.
- Parameters:
- Returns:
The cached token or
None
if there is no matching token in the cache.- Return type:
Token or None
Notes
The token is not checked for validity or expiration. This must be done by the caller, while holding the lock, and the token replaced in the cache if it is not valid.
- store(token_data, service, scopes, token)¶
Store an internal token in the cache.
Should only be called while holding the lock.