Each wiki process builds the wiki RDF graph once (unless you pass --reload) and reuses it for:
- every Wiki Subcommand query in that process
- every SPARQL block in Wiki Subcommand render
wiki build --renderwhen rendering before static output
OWL-RL expansion runs when inference is enabled (default for most commands; use --no-inference on query / render when debugging asserted triples only).
Cross-process reuse
- By default, a new shell still starts cold.
- Pass
--cacheon Wiki Subcommand query, Wiki Subcommand render, orwiki build --renderto persist a warm graph under.wiki/cache/. - The persisted graph is reused only when the wiki fingerprint still matches.
--reloadforces a fresh build and refreshes the current cache entry.
Long-lived workflows
Wiki Subcommand serve with --watch keeps one process alive. On file changes it rebuilds the graph, re-runs SPARQL rendering, and reloads the browser.
Tradeoffs
- In-process reuse is still the default and simplest model.
--cachehelps repeated one-shot commands across fresh shells.- The disk cache is invalidated automatically on wiki or config changes.
.wiki/cache/is excluded from wiki fingerprinting so cache artifacts do not invalidate themselves.
CI tips
wiki render --check # fail if any inline block is stale
wiki render --cache # repeated one-shot render loop across shells
wiki build --render --cache # repeated one-shot render + build loop across shells
wiki query "..." # same graph as a prior render in one script if you chain in one shell
Related
- Wiki Subcommand query
- Wiki Subcommand render
- Wiki Subcommand serve — long-lived preview and optional SPARQL endpoint