Repo cache
What the repo cache holds and what it saved, and clearing it.
The daemon keeps verified copies of public git repositories so a repeat git clone in a Space is fast. repo_cache_status reads what it holds and what the last week saved in plain words; repo_cache_clear deletes every copy. It is on by default and is turned off, or given a size, with config_set on cache.repos and cache.repos_size_gb.
RepoCacheStatus record#
What the repo cache holds and what it saved, in plain words for
Settings (cache.repos and cache.repos_size_gb are its settings,
changed with config_set).
Returned by repo_cache_clear, repo_cache_status.
| Field | Type | Default | Description |
|---|---|---|---|
enabled | bool | The cache is on (cache.repos). | |
repos | u32 | Repositories held. | |
bytes | u64 | What they take on disk. | |
cap_bytes / capBytes | u64 | The size cap in force. | |
size_setting / sizeSetting | String | The size setting: auto, or the number of GB. | |
summary | String | Repos: 3, 1.2 GB of 5 GB. | |
week | String | Last week: 80% of clones came from the cache, about 2 minutes saved. | |
hits | u32 | Clones served from the cache in the last week. | |
misses | u32 | Clones that downloaded in the last week. | |
seconds_saved / secondsSaved | u64 | Seconds the hits saved. |
repo_cache_status#
The repo cache now: on or off, how much it holds of its cap, and what the last week saved.
def repo_cache_status() -> RepoCacheStatusReturns RepoCacheStatus · Raises CuaError
repo_cache_clear#
Deletes every repository the repo cache holds (they are copied again the next time a Space clones them). Returns the cache after.
def repo_cache_clear() -> RepoCacheStatusReturns RepoCacheStatus · Raises CuaError