Get the free storage capacity of the cache.
(self)
| 88 | raise ValueError("max_records should be greater than 0") |
| 89 | |
| 90 | def free_storage_in_gb(self) -> float: |
| 91 | ''' Get the free storage capacity of the cache. ''' |
| 92 | # measure the root directory |
| 93 | if self.cache_root.parent.exists(): |
| 94 | usage = shutil.disk_usage(self.cache_root.parent) |
| 95 | return usage.free / 1024**3 |
| 96 | return 0 |
| 97 | |
| 98 | def get_engine_building_cache_stage(self, |
| 99 | build_config: BuildConfig, |