Skip to main content

Module cache

Module cache 

Source

Structs§

CacheManager
Manages cache directory and cache file operations
CachedFooter
What one file’s footer said, as much as a reopen needs. It comes back as a FileFooter, so a cached dataset goes through the same code as a fresh read.
CloudListing
A cloud source’s buckets from an earlier run, shown at once while a fresh listing is out.
DatasetFacts
What datui remembers about a measured dataset: a cache, not a catalog. Every field is re-derivable, and the recorded size and mtime invalidate a changed dataset.
DatasetShape
What an open learned about a dataset’s files, so the next open shows columns and row count without reading footers (seconds for thousands of objects). The listing, which happens anyway, decides via the fingerprint whether this still holds. A cache, not a catalog, like DatasetFacts.
FileFooters
The footers a dataset’s count has read, each by file_identity, so a recount reads only new files and a stopped count keeps its progress. By file, unlike DatasetShape, so it stays right for a changed dataset.
StableHasher
A hash that is the same in every build, for file names and fingerprints.
Visits
How often and how lately a dataset was opened: zoxide-style frecency, ranking Recent and lifting often-opened matches.

Enums§

HistoryUpdate
Whether a history update happened. Contended updates are abandoned rather than awaited, so “no error” and “written” differ; callers and tests can tell exactly.

Constants§

MAX_RECENTS
Maximum recent paths kept: a few days of work, never needing pagination.

Functions§

by_frecency
recents reordered by frecency; ties and pre-visit-count recents keep their order.
file_identity
A file’s identity for FileFooters: key, size, mtime and store tag, any of which changes on rewrite.
stable_hash
CRC-64/XZ of one byte string.