Skip to content

glx cache

Manage the binary archive cache for fast repeated loading

Synopsis

Build and manage a binary cache (.glx/cache.bin) of a multi-file archive.

Every command that loads an archive parses YAML on each run. For large archives that cost grows to tens of seconds and gigabytes of memory. The binary cache persists the fully parsed archive so later commands deserialize a blob instead of re-parsing YAML.

Read commands (summary, query, timeline, analyze, stats, ...) automatically use a fresh cache when one is present. Set GLX_CACHE=auto to also build the cache on the first run that misses, or GLX_CACHE=off to ignore the cache entirely.

The cache is derived and disposable. Staleness is detected from a filesystem (path, size, mtime) fingerprint; a cache that is missing, stale, or unreadable is silently ignored and the YAML parse runs instead. Like any mtime-based cache, a content edit that preserves a file's size and mtime is the one change it cannot detect — use 'glx cache build'/'glx cache clean' to force a refresh in that case. The archive's git commit and clean state are also recorded and shown by 'glx cache status', but do not affect staleness. Only multi-file (directory) archives are supported.

Examples

  # Build a cache for the current archive
  glx cache build

  # Force a rebuild even if the cache is fresh
  glx cache build --force

  # Show cache status (exists, fresh/stale, size, contents)
  glx cache status

  # Remove the cache
  glx cache clean

  # Run a command with auto-build on cache miss
  GLX_CACHE=auto glx summary "Jane Webb"

Options

  -h, --help   help for cache

Options inherited from parent commands

  -q, --quiet   Suppress non-error output (where supported)

SEE ALSO

  • glx - GENEALOGIX CLI - Manage and validate genealogy archives
  • glx cache build - Build (or rebuild) the binary cache for an archive
  • glx cache clean - Remove the binary cache for an archive
  • glx cache status - Show binary cache status (exists, fresh/stale, size, contents)

Licensed under Apache License 2.0