Read/write functions for the .apollo-test/ run cache. Cache format is EDN with a :version key for forward compatibility.
Cache shape: {:version "1" :entries {path -> {:path ... :mtime ... :content-hash ... :ns-sym ...}} :ns-forms {path -> {:ns-sym sym :deps #{dep-syms}}} ; cached parsed ns forms for graph :failed-nss #{ns.name ...}} ; set of previously-failed namespace symbols
Read/write functions for the .apollo-test/ run cache.
Cache format is EDN with a :version key for forward compatibility.
Cache shape:
{:version "1"
:entries {path -> {:path ... :mtime ... :content-hash ... :ns-sym ...}}
:ns-forms {path -> {:ns-sym sym :deps #{dep-syms}}} ; cached parsed ns forms for graph
:failed-nss #{ns.name ...}} ; set of previously-failed namespace symbols(cache-path cache-dir)Returns the java.io.File for the cache file within the given cache directory.
Returns the java.io.File for the cache file within the given cache directory.
(empty-cache)Returns a fresh, empty cache map with the current version.
Returns a fresh, empty cache map with the current version.
(read-cache cache-dir)Reads the run cache from disk. Returns nil if:
Reads the run cache from disk. Returns nil if: - the cache file does not exist - the file is unreadable or malformed - the :version key does not match the current cache-version - the :entries value is present but not a map
(write-cache cache-dir cache)Writes the run cache to disk as EDN. Creates the cache directory if it does not exist. Uses write-to-temp-then-rename for atomic writes so a crash mid-write cannot corrupt the cache.
Writes the run cache to disk as EDN. Creates the cache directory if it does not exist. Uses write-to-temp-then-rename for atomic writes so a crash mid-write cannot corrupt the cache.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |