Liking cljdoc? Tell your friends :D

test-filter.cache

Persistence and caching of symbol graphs with git revision tracking.

Persistence and caching of symbol graphs with git revision tracking.
raw docstring

*cache-file*clj

source

cache-pathclj

(cache-path)

Returns the path to the cache file, relative to the project root.

Returns the path to the cache file, relative to the project root.
sourceraw docstring

cache-valid?clj

(cache-valid? cached-graph)

Checks if cached graph is valid for the current git revision. Returns true if cache exists and matches current revision.

Checks if cached graph is valid for the current git revision.
Returns true if cache exists and matches current revision.
sourceraw docstring

changed-files-since-cacheclj

(changed-files-since-cache cached-graph)

Returns set of files that have changed since the cached revision.

Returns set of files that have changed since the cached revision.
sourceraw docstring

get-or-build-graphclj

(get-or-build-graph &
                    {:keys [force incremental paths]
                     :or {incremental true paths ["src"]}})

Gets cached graph if valid, otherwise builds a fresh one.

Options:

  • :force - Force rebuild even if cache is valid
  • :incremental - Try incremental update if cache is stale (default true)
  • :paths - Paths to analyze (default ["src"])

Returns symbol graph with metadata.

Gets cached graph if valid, otherwise builds a fresh one.

Options:
- :force - Force rebuild even if cache is valid
- :incremental - Try incremental update if cache is stale (default true)
- :paths - Paths to analyze (default ["src"])

Returns symbol graph with metadata.
sourceraw docstring

incremental-updateclj

(incremental-update {:keys [nodes edges files] :as cached-graph}
                    changed-file-set)

Updates a cached graph by re-analyzing only changed files.

Steps:

  1. Find files changed since cache
  2. Re-analyze those files
  3. Remove old symbols from those files
  4. Add new symbols from analysis
  5. Update revision

Returns updated graph.

Updates a cached graph by re-analyzing only changed files.

Steps:
1. Find files changed since cache
2. Re-analyze those files
3. Remove old symbols from those files
4. Add new symbols from analysis
5. Update revision

Returns updated graph.
sourceraw docstring

invalidate-cache!clj

(invalidate-cache!)

Deletes the cache file.

Deletes the cache file.
sourceraw docstring

load-graphclj

(load-graph)

Loads a cached symbol graph from disk. Returns nil if cache doesn't exist or is invalid.

Loads a cached symbol graph from disk.
Returns nil if cache doesn't exist or is invalid.
sourceraw docstring

save-graph!clj

(save-graph! symbol-graph revision)

Persists a symbol graph to disk with revision metadata.

Graph structure: {:revision "abc123..." :analyzed-at "2024-..." ; ISO-8601 string :nodes {...} :edges [...] :files {"src/foo.clj" {:symbols [...] :revision "abc123"}}}

Persists a symbol graph to disk with revision metadata.

Graph structure:
{:revision "abc123..."
 :analyzed-at "2024-..."  ; ISO-8601 string
 :nodes {...}
 :edges [...]
 :files {"src/foo.clj" {:symbols [...] :revision "abc123"}}}
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close