Expand description
Cache: what the text of a file was made into — a STEP file’s bodies —
kept by the workspace, so that a file is made into the same thing once
for every build that reads it (a step’s preview, the program it is
committed to, a part placed from it in another file), and, with a
CacheStore, once for every process. With a store, it keeps what
the programs of the workspace built too, so that reopening one whose
steps and inputs did not change builds nothing (see crate::kept).
What a cache keeps is the answer to “what does this text read as”, and nothing else: it is looked up by the file’s path and checked against the file’s whole text in memory, and against the text’s digest and length, and the kernel build that made it, on disk. A value from another build of the kernel may have been made by other code, so it is made again rather than trusted.
On disk, what the file path was made into is kept in path.geopc
beside it: AX-12A.STEP.geopc (a shared library’s file in a folder of
the store’s own, see cache_path). Its values are written exactly
(geop_core_math::exact), so the value read back is the value that
was made. A .geopc file is a cache: deleting it costs a make, and it
belongs in no repository.
Structs§
Constants§
- CACHE_
EXTENSION - The extension of a cache file: what the file it is beside was made
into (
Cache).
Traits§
- Cache
Store - Where a
Cachekeeps what it made between processes: a folder on disk, for a kernel run by the command line or an editor’s host process.
Functions§
- cache_
path - The cache file of the file
path: beside it,path.geopc— or, for a file of a library every workspace shares, which is not where the files of the workspace are (seeis_shared), in a folder of the store’s own, by the library’s scheme:std:hex_nut.geopin.geopc/std/hex_nut.geop.geopc. - digest
- A 128-bit FNV-1a hash of
text: written out here rather than the standard library’s hasher, which may change between Rust versions, so that what is saved of a text keeps naming the same text.