diff --git a/kitty/fast_data_types.pyi b/kitty/fast_data_types.pyi index 0d28c061c..1e3e87519 100644 --- a/kitty/fast_data_types.pyi +++ b/kitty/fast_data_types.pyi @@ -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: ...