Files
django-stubs/django/core/cache/backends/locmem.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

38 lines
1.2 KiB
Python

from typing import (
Any,
Dict,
Optional,
Union,
)
class LocMemCache:
def __init__(self, name: str, params: Dict[str, Any]) -> None: ...
def _delete(self, key: str) -> None: ...
def _has_expired(self, key: str) -> bool: ...
def _set(self, key: str, value: bytes, timeout: object = ...) -> None: ...
def add(
self,
key: str,
value: Union[int, Dict[str, int], str, Dict[str, str]],
timeout: object = ...,
version: Optional[int] = ...
): ...
def clear(self) -> None: ...
def delete(self, key: str, version: Optional[int] = ...) -> None: ...
def get(
self,
key: Union[str, int],
default: Optional[Union[str, int]] = ...,
version: Optional[int] = ...
) -> Any: ...
def has_key(self, key: str, version: Optional[int] = ...): ...
def incr(self, key: Union[str, int], delta: int = ..., version: Optional[int] = ...) -> int: ...
def set(
self,
key: Union[str, int],
value: Any,
timeout: object = ...,
version: Optional[int] = ...
) -> None: ...
def touch(self, key: str, timeout: object = ..., version: None = ...): ...