run-cached
Run a build with a parquet cache wrapping the expression.
Identical to xorq run in semantics, but wraps the expression in a parquet cache so subsequent invocations short-circuit when inputs haven’t changed.
Cache strategies:
modification-time(default): ParquetCache. Inputs are tracked by file modification time; the cache invalidates when an input file’s mtime changes.snapshot: ParquetSnapshotCache. The cache is keyed by a content snapshot of the inputs and never invalidates implicitly.snapshotwith--ttl: ParquetTTLSnapshotCache. The cache entry also expires after the supplied TTL (in seconds).
Usage
xorq run-cached BUILD_PATH [OPTIONS]Arguments
BUILD_PATH—Path to the build directory produced byxorq build.
Options
| Option | Default | Description |
|---|---|---|
--cache-dir |
$XORQ_CACHE_DIR or ~/.cache/xorq |
Directory for parquet cache files. |
-o, --output-path |
/dev/null (discard) |
Path to write output. Use ‘-’ for stdout. |
-f, --format |
parquet |
Output format. |
--limit |
unlimited | Maximum number of rows to output. |
--cache-type |
modification-time |
Cache strategy: ‘modification-time’ (ParquetCache) or ‘snapshot’ (ParquetSnapshotCache). |
--ttl |
none | TTL in seconds for snapshot cache (uses ParquetTTLSnapshotCache when set). |
-p, --params |
none | Override an expression parameter as key=value (repeatable, for example –params threshold=0.5). |
Examples
# Default modification-time cache
xorq run-cached builds/f02d28198715 --cache-dir ./cache -o results.parquet
# Snapshot cache with a 1-hour TTL
xorq run-cached builds/f02d28198715 --cache-type snapshot --ttl 3600 -o results.parquetSee also
run—same semantics, without the cache wrapperuv run-cached—same semantics, inside a uv-managed environment