You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
762 B
Python
36 lines
762 B
Python
"""
|
|
This type stub file was generated by pyright.
|
|
"""
|
|
|
|
from . import base
|
|
|
|
"""File based cache for the discovery document.
|
|
|
|
The cache is stored in a single file so that multiple processes can
|
|
share the same cache. It locks the file whenever accessing to the
|
|
file. When the cache content is corrupted, it will be initialized with
|
|
an empty cache.
|
|
"""
|
|
LOGGER = ...
|
|
FILENAME = ...
|
|
EPOCH = ...
|
|
class Cache(base.Cache):
|
|
"""A file based cache for the discovery documents."""
|
|
def __init__(self, max_age) -> None:
|
|
"""Constructor.
|
|
|
|
Args:
|
|
max_age: Cache expiration in seconds.
|
|
"""
|
|
...
|
|
|
|
def get(self, url): # -> Any | None:
|
|
...
|
|
|
|
def set(self, url, content): # -> None:
|
|
...
|
|
|
|
|
|
|
|
cache = ...
|