Add type definition for DiskCache
This commit is contained in:
parent
0813a3daff
commit
5df0dd0959
1 changed files with 15 additions and 0 deletions
|
|
@ -1698,3 +1698,18 @@ class MousePosition(TypedDict):
|
|||
in_left_half_of_cell: bool
|
||||
|
||||
def get_mouse_data_for_window(os_window_id: int, tab_id: int, window_id: int) -> Optional[MousePosition]: ...
|
||||
|
||||
|
||||
class DiskCache:
|
||||
small_hole_threshold: int
|
||||
defrag_factor: int
|
||||
@property
|
||||
def total_size(self) -> int: ...
|
||||
|
||||
def add(self, key: bytes, data: bytes) -> None: ...
|
||||
def remove(self, key: bytes) -> bool: ...
|
||||
def remove_from_ram(self, predicate: Callable[[bytes], bool]) -> int: ...
|
||||
def num_cached_in_ram(self) -> int: ...
|
||||
def get(self, key: bytes, store_in_ram: bool = False) -> bytes: ... # raises KeyError if not found
|
||||
def size_on_disk(self) -> int: ...
|
||||
def clear(self) -> None: ...
|
||||
|
|
|
|||
Loading…
Reference in a new issue