Expand description
Cache management and memory-mapped I/O
The cache module handles the .reflex/ directory structure:
meta.db: Metadata, file fingerprints, dependencies and the symbol cache (SQLite)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§
- Branch
Info - Branch metadata information
- Cache
Manager - Manages the Reflex cache directory
- File
Fingerprint - What freshness compares a file on disk against.
- FileRow
- One
filesrow as the indexer writes it. - File
Stat - Modification time as nanoseconds since the Unix epoch,
0when unavailable. The size and mtime a walk records for a file: all that change detection and a stored fingerprint need (24 bytes, where aMetadatais ~150; a walk keeps one per file). - Status
Reads - Result of
CacheManager::status_reads.
Constants§
- CACHE_
DIR - Default cache directory name
- CONFIG_
TOML - HASHES_
JSON Deprecated - LANGUAGES_
OVERRIDE_ KEY statisticskey: the--languagesof the lastrfx indexrun that passed one (JSON list). Older binaries ignore it.- META_DB
- File names within the cache directory
- TOKENS_
BIN Deprecated - WALK_
SEQ_ GAP - Spacing of
files.walk_seqin a full build (position * WALK_SEQ_GAP), so a file added later can take a value between its neighbours without renumbering.
Functions§
- mtime_
ns - 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.