settings
settings
#
The scratch's size budget, kept in settings.toml beside the objects.
Settings
dataclass
#
How much disk the cache may claim.
Attributes:
| Name | Type | Description |
|---|---|---|
max_size_gb |
float | None
|
A hard cap on the cache's bytes, in gigabytes; |
free_space_ratio |
float
|
The fraction of releasable disk (free space plus the cache itself) the cache may occupy. |
Source code in capturegraph-lib/capturegraph/recipes/scratch/settings.py
budget_bytes(available_bytes, cache_bytes)
#
The bytes the cache may hold given the disk's free space and its own size.
Source code in capturegraph-lib/capturegraph/recipes/scratch/settings.py
load_or_create(root, *, max_size_gb=None, free_space_ratio=None)
classmethod
#
The settings under root, overrides applied and persisted; a template if absent.