class documentation
class ThrottledTokenCache: (source)
Constructor: ThrottledTokenCache(name, cache_file, throttle)
A throttled file-based token cache.
Method | __init__ |
Undocumented |
Async Method | get |
Get the cached token, respecting the throttle. |
Method | get |
Get the cached token without checking the throttle. |
Async Method | refresh |
Refresh the cached token by fetching it again. |
Async Method | remove |
Remove the token from the cache. |
Async Method | remove |
Remove the token from the cache if it matches the provided token. |
Async Method | set |
Set the token in the cache and update the throttle. |
Instance Variable | _cache |
Undocumented |
Instance Variable | _cached |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _next |
Undocumented |
Instance Variable | _throttle |
Undocumented |
def __init__(self, name: DEFAULT_CONFIG_DIR) / DEFAULT_CREDENTIALS_FILE, throttle: minutes=5)):
(source)
¶
str
, cache_file: str | Path
= Path(timedelta | float
= timedelta(Undocumented