Skip to main content

open_cache

Function open_cache 

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

Open (or create) the SQLite cache for journal.

  • Fresh DB (user_version = 0): schema is applied and version is set.
  • DB version = SCHEMA_VERSION: opened as-is.
  • DB version ≠ SCHEMA_VERSION: returns Error::CacheSchemaTooNew. This should not normally occur because the DB filename already encodes the version; it indicates manual tampering. Run archelon cache rebuild to recreate the current-version DB.