Skip to main content

Module cache

Module cache 

Source

Structs§

Snapshot

Constants§

SNAPSHOT_VERSION

Functions§

age
cache_dir
domain_store
Write a new snapshot file into base/{domain}/; never touches existing ones.
is_fresh
is_valid
latest_file
Path of the newest snapshot file for a domain, or None when none exists.
load
load_snapshot
migrate_legacy_file
Move a legacy flat {domain}.json cache file into the append-only layout as {domain}/{timestamp}.json. The file content is never touched; only its path changes. The snapshot timestamp comes from the file’s mtime, so freshness is preserved. Idempotent: a no-op when no legacy file exists.
store
store_snapshot_for
Serialize a CT snapshot into a fresh timestamped file. Any previous snapshots remain on disk untouched.
timestamp_now
timestamp_of
UTC timestamp used in snapshot file names: YYYYMMDDTHHMMSS.NNNNNNNNNZ. Fixed width, so lexicographic order matches chronological order.