Skip to main content

sync_cache

Function sync_cache 

Source
pub fn sync_cache(journal: &Journal, conn: &Connection) -> Result<()>
Expand description

Incrementally sync the cache against the journal’s .md files.

Files whose mtime changed or whose path is new are re-parsed and upserted. Files present in the DB but gone from disk are removed (handles Syncthing/ Nextcloud deletions propagated with the original mtime).

FTS5 index is rebuilt in full only when at least one entry changed, avoiding unnecessary work on invocations where nothing has changed.