Start another transaction and empty all caches.
(self)
| 50 | self.package_root = package_root |
| 51 | |
| 52 | def flush(self) -> None: |
| 53 | """Start another transaction and empty all caches.""" |
| 54 | self.stat_or_none_cache: dict[str, os.stat_result | None] = {} |
| 55 | |
| 56 | self.listdir_cache: dict[str, list[str]] = {} |
| 57 | self.listdir_error_cache: dict[str, OSError] = {} |
| 58 | self.isfile_case_cache: dict[str, bool] = {} |
| 59 | self.exists_case_cache: dict[str, bool] = {} |
| 60 | self.read_cache: dict[str, bytes] = {} |
| 61 | self.read_error_cache: dict[str, Exception] = {} |
| 62 | self.hash_cache: dict[str, str] = {} |
| 63 | self.fake_package_cache: set[str] = set() |
| 64 | |
| 65 | def stat_or_none(self, path: str) -> os.stat_result | None: |
| 66 | if path in self.stat_or_none_cache: |