Tstickers Index / Tstickers / Caching
Auto-generated documentation for tstickers.caching module.
-
cachedSession
- requests_cache: CachedSession('.cache/tstickers.requests.sqlite', backend='sqlite', expire_after=60 * 60 * 12, allowable_codes=(200), allowable_methods=('GET', 'POST'))
Get the appropriate cache verification function based on version.
version
int - Cache version
Callable[[dict[str, Any]], bool]: Cache verification function
def _get_verify_function(version: int) -> Callable[[dict[str, Any]], bool]: ...
Verify the cache for a packName using cache data.
data (dict[Path, Any]): packName cache data to verify
bool
- if the converted cache has been verified
def _verify_converted_v1(data: dict[str, Any]) -> bool: ...
Write cache data to a file identified by packName.
pack_name
str - name of the sticker pack eg. "DonutTheDog"data
dict - packName cache data to write to cache
def create_converted(pack_name: str, data: dict) -> None: ...
Verify the cache for a packName eg. "DonutTheDog". Uses the cache "version" to call the verify function for that version.
pack_name
str - name of the sticker pack eg. "DonutTheDog"
bool
- if the converted cache has been verified
def verify_converted(pack_name: str) -> bool: ...