mix ragex.cache.refresh (Ragex v0.14.1)

View Source

Refreshes the embeddings cache for the current project.

Usage

mix ragex.cache.refresh [options]

Options

--full          Perform full refresh (re-analyze all files)
--incremental   Perform incremental refresh (default, only changed files)
--path PATH     Directory to refresh (default: current directory)
--stats         Show statistics after refresh

Examples

# Incremental refresh (default)
$ mix ragex.cache.refresh

# Full refresh (re-analyze everything)
$ mix ragex.cache.refresh --full

# Refresh specific directory
$ mix ragex.cache.refresh --path lib/

# Show statistics after refresh
$ mix ragex.cache.refresh --stats

Description

This task refreshes the embeddings cache by analyzing files in the project. By default, it performs an incremental refresh, only re-analyzing files that have changed since the last analysis.

Incremental Mode (default)

  • Checks file content hashes to detect changes
  • Skips unchanged files (reads from cache)
  • Only regenerates embeddings for changed entities
  • Typically <5% regeneration on single-file changes

Full Mode (--full)

  • Re-analyzes all files from scratch
  • Regenerates all embeddings
  • Useful after model changes or cache corruption
  • Takes longer but ensures consistency