Returns whether the Lake cache is disabled.
An empty directory string indicates the cache is disabled.
Equations
- cache.isDisabled = cache.dir.toString.isEmpty
Instances For
Returns the artifact directory for the Lake cache.
Instances For
Returns the path to artifact in the Lake cache with extension ext
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the path to the artifact in the Lake cache with extension ext
if it exists.
If the Lake cache is disabled, the behavior of this function is undefined.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The file where the package's input mapping is stored in the Lake cache.
Instances For
Maps an input hash to a structure of artifact content hashes.
These mappings are stored in a per-package JSON Lines file in the Lake cache.
Equations
Instances For
Load a CacheMap
from a JSON Lines file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Save a CacheMap
to a JSON Lines file.
Entries already in the file but not in the map will not be removed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the output data associated with the input hash in the cache.
Equations
- Lake.CacheMap.get? inputHash cache = Std.HashMap.get? cache inputHash
Instances For
Associate output data (as JSON) with the given the input hash.
Equations
- Lake.CacheMap.insertCore inputHash val cache = Std.HashMap.insert cache inputHash val
Instances For
Associate output data with the given the input hash.
Equations
- Lake.CacheMap.insert inputHash val cache = Lake.CacheMap.insertCore inputHash (Lean.toJson val) cache
Instances For
Returns the output data associated with the input hash in the cache.
Equations
- Lake.CacheRef.get? inputHash cache = ST.Ref.modifyGet cache fun (m : Lake.CacheMap) => (Lake.CacheMap.get? inputHash m, m)
Instances For
Associate output data with the given the input hash.
Equations
- Lake.CacheRef.insert inputHash val cache = ST.Ref.modify cache fun (x : Lake.CacheMap) => Lake.CacheMap.insert inputHash (Lean.toJson val) x