:py:mod:`cache` =============== .. py:module:: cache .. autoapi-nested-parse:: Abstract base class for implementing a token cache interface. This module defines the `Cache` class, which specifies the interface for caching OAuth2 tokens based on scopes and audiences. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cache.Cache .. py:class:: Cache Bases: :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: cache.Cache :parts: 1 :private-bases: Abstract base class for caching OAuth2 tokens. This class defines the interface for a token cache that stores and retrieves OAuth2 access tokens based on a combination of scopes and audiences. It is intended to be subclassed by specific caching backends. .. py:method:: get_cache_token(scopes, audiences, key_prefix=None) :abstractmethod: Retrieve a cached token based on scopes and audiences. .. py:method:: set_cache_token(scopes, audiences, token, key_prefix=None) :abstractmethod: Store a token in the cache with a key based on scopes and audiences.