Caches built call graphs per repo path so repeated queries (e.g. from MCP tool calls) don't re-walk and re-parse the whole repo on every call.
Building a graph for a large repo takes real wall-clock time (seconds),
so the first call for a given path pays that cost and every subsequent
call for the same path is an in-memory lookup, until reindex/2 is
called explicitly.
Also persists the built graph to <repo_path>/.beamscope/callgraph.json
(Beamscope.Callgraph.Graph.to_node_link_json/1) so a server restart reloads it from disk
instead of re-parsing the whole repo from source. Writes go to a
.tmp.<unique> file first, renamed into place only once fully written —
a crash mid-write leaves the last-known-good real file untouched rather
than corrupting it.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the cached graph for repo_path, building and caching it first
if this is the first request for that path.
Returns whether repo_path has a cached graph, without building one.
Forces a rebuild of the graph for repo_path, replacing any cached version.
Types
@type repo_path() :: String.t()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns the cached graph for repo_path, building and caching it first
if this is the first request for that path.
Returns whether repo_path has a cached graph, without building one.
Forces a rebuild of the graph for repo_path, replacing any cached version.
@spec start_link(keyword()) :: GenServer.on_start()