Spaces:
Sleeping
Sleeping
from collections.abc import Callable | |
from collections.abc import Iterable | |
from collections.abc import Mapping | |
from typing import TypeVar | |
from .mixins import ImmutableDictMixin | |
from .mixins import UpdateDictMixin | |
T = TypeVar("T") | |
_CPT = TypeVar("_CPT", str, int, bool) | |
def cache_control_property( | |
key: str, empty: _CPT | None, type: type[_CPT] | |
) -> property: ... | |
class _CacheControl( | |
UpdateDictMixin[str, str | int | bool | None], dict[str, str | int | bool | None] | |
): | |
provided: bool | |
def __init__( | |
self, | |
values: Mapping[str, str | int | bool | None] | |
| Iterable[tuple[str, str | int | bool | None]] = (), | |
on_update: Callable[[_CacheControl], None] | None = None, | |
) -> None: ... | |
def no_cache(self) -> bool | None: ... | |
def no_cache(self, value: bool | None) -> None: ... | |
def no_cache(self) -> None: ... | |
def no_store(self) -> bool | None: ... | |
def no_store(self, value: bool | None) -> None: ... | |
def no_store(self) -> None: ... | |
def max_age(self) -> int | None: ... | |
def max_age(self, value: int | None) -> None: ... | |
def max_age(self) -> None: ... | |
def no_transform(self) -> bool | None: ... | |
def no_transform(self, value: bool | None) -> None: ... | |
def no_transform(self) -> None: ... | |
def _get_cache_value(self, key: str, empty: T | None, type: type[T]) -> T: ... | |
def _set_cache_value(self, key: str, value: T | None, type: type[T]) -> None: ... | |
def _del_cache_value(self, key: str) -> None: ... | |
def to_header(self) -> str: ... | |
def cache_property(key: str, empty: _CPT | None, type: type[_CPT]) -> property: ... | |
class RequestCacheControl( # type: ignore[misc] | |
ImmutableDictMixin[str, str | int | bool | None], _CacheControl | |
): | |
def max_stale(self) -> int | None: ... | |
def max_stale(self, value: int | None) -> None: ... | |
def max_stale(self) -> None: ... | |
def min_fresh(self) -> int | None: ... | |
def min_fresh(self, value: int | None) -> None: ... | |
def min_fresh(self) -> None: ... | |
def only_if_cached(self) -> bool | None: ... | |
def only_if_cached(self, value: bool | None) -> None: ... | |
def only_if_cached(self) -> None: ... | |
class ResponseCacheControl(_CacheControl): | |
def public(self) -> bool | None: ... | |
def public(self, value: bool | None) -> None: ... | |
def public(self) -> None: ... | |
def private(self) -> bool | None: ... | |
def private(self, value: bool | None) -> None: ... | |
def private(self) -> None: ... | |
def must_revalidate(self) -> bool | None: ... | |
def must_revalidate(self, value: bool | None) -> None: ... | |
def must_revalidate(self) -> None: ... | |
def proxy_revalidate(self) -> bool | None: ... | |
def proxy_revalidate(self, value: bool | None) -> None: ... | |
def proxy_revalidate(self) -> None: ... | |
def s_maxage(self) -> int | None: ... | |
def s_maxage(self, value: int | None) -> None: ... | |
def s_maxage(self) -> None: ... | |
def immutable(self) -> bool | None: ... | |
def immutable(self, value: bool | None) -> None: ... | |
def immutable(self) -> None: ... | |