caches
CacheDB
¶
Bases: ABC
Abstract base class for connecting to a local SQLite cache database.
This class is intended to always be used with a context manager to properly close the connection to the cache database.
__enter__()
¶
Called when entering the context manager.
__exit__(exc_type, exc_value, exc_traceback)
¶
Called when exiting the context manager.
get_default_cache_db_file_dir()
classmethod
¶
Gets the expected directory for the cache database file based on OS environment variables. If a directory cannot be found, defaults to the working directory.
remove_cache()
¶
Removes the underlying cache contents from the file system.
HashCache
¶
Bases: CacheDB
Class used to store and retrieve entries in the local file hash cache.
This class is intended to always be used with a context manager to properly close the connection to the hash cache database.
This class also automatically locks when doing writes, so it can be called by multiple threads.
HashCacheEntry
dataclass
¶
Represents an entry in the local hash-cache database
S3CheckCache
¶
Bases: CacheDB
Maintains a cache of 'last seen on S3' entries in a local database, which specifies which full S3 object keys exist in the content-addressed storage in the Job Attachments S3 bucket.
This class is intended to always be used with a context manager to properly close the connection to the hash cache database.
This class also automatically locks when doing writes, so it can be called by multiple threads.
S3CheckCacheEntry
dataclass
¶
Represents an entry in the local s3 check cache database