cuda.core.utils.SQLiteProgramCache#
- class cuda.core.utils.SQLiteProgramCache( )#
Persistent program cache backed by a single sqlite3 database file.
Suitable for single-process workflows. Multiple processes can share the file (sqlite3 WAL mode serialises writes), but
FileStreamProgramCacheis the recommended choice for concurrent workers.- Parameters:
path – Filesystem path to the sqlite3 database. The parent directory is created if missing.
max_size_bytes – Optional cap on the sum of stored payload sizes. When that total exceeds the cap, the least-recently-used entries are evicted until the logical total is at or below the cap;
Nonemeans unbounded. Real on-disk usage tracks the logical total at quiescent points: WAL frames and freed pages are reclaimed opportunistically viawal_checkpoint(TRUNCATE)+VACUUMafter each eviction, butsqlite3skips both under active readers or writers. With concurrent access, the on-disk file can grow above the cap until readers release;FileStreamProgramCacheis the right backend for multi-process workloads with strict on-disk bounds.
Methods
- get(
- key: bytes | str,
- default: ObjectCode | None = None,
Return
self[key]ordefaultif absent.