hydromodpy.data.registry.cache_lifecycle#

Cache lifecycle: destructive ops and sidecar inserters.

Concern: every operation that mutates the catalog beyond register (invalidation, subsumption, prune, repair, cleanup) and the sidecar table inserters (artifacts, provenance, stations, coverage, failures, validation reports). Every SQL statement routes through catalog.backend (the cache-side CacheBackend port), never through the raw _conn attribute.

Functions

check_and_fix(catalog)

Scan entries and attempt to repair inconsistencies.

cleanup(catalog)

Remove entries whose files no longer exist on disk.

invalidate(catalog, *[, variable, source, ...])

Remove matching entries.

prune_older_than(catalog, *, days[, ...])

Delete cache entries older than days days.

subsume_entries(catalog, *, variable, ...[, ...])

Delete grid entries fully contained within the given bbox+dates.

upsert_station(catalog, *, station_id, variable)

Insert or update a station metadata row.

write_artifact(catalog, *, artifact_type, path)

Record an artifact row; returns its id.

write_coverage(catalog, *, variable[, ...])

Record a coverage row; returns its id.

write_failure(catalog, *[, variable, ...])

Record a failure row; returns its id.

write_provenance(catalog, *[, artifact_id, ...])

Record a provenance row; returns its id.

write_validation_report(catalog, *, ...[, ...])

Record a validation report; returns its id.