Skip to main content

Module cache

Module cache 

Source
Expand description

Cache management and memory-mapped I/O

The cache module handles the .reflex/ directory structure:

  • meta.db: Metadata, file hashes, and configuration (SQLite)
  • tokens.bin: Compressed lexical tokens (binary)
  • content.bin: Memory-mapped file contents (binary)
  • trigrams.bin: Trigram inverted index (per-file varint blocks, V4 format)
  • config.toml: Index settings (TOML text)

Structs§

BranchInfo
Branch metadata information
CacheManager
Manages the Reflex cache directory
FileFingerprint
What freshness compares a file on disk against.
FileRow
One files row as the indexer writes it.
StatusReads
Result of CacheManager::status_reads.

Constants§

CACHE_DIR
Default cache directory name
CONFIG_TOML
HASHES_JSON
META_DB
File names within the cache directory
TOKENS_BIN

Functions§

mtime_ns
Modification time as nanoseconds since the Unix epoch, 0 when unavailable.
open_meta_db
Open a SQLite database with Reflex’s standard pragmas.
recorded_mtime_ns
The mtime to record for a file read during an index run that began at run_start.