swh.vault.cache module

class swh.vault.cache.VaultCache(**objstorage)[source]

Bases: object

The Vault cache is an object storage that stores Vault bundles.

This implementation computes sha1(‘<bundle_type>:<swhid>’) as the internal identifiers used in the underlying objstorage.

add(bundle_type, swhid: swh.model.swhids.CoreSWHID, content)[source]
get(bundle_type, swhid: swh.model.swhids.CoreSWHID)[source]
delete(bundle_type, swhid: swh.model.swhids.CoreSWHID)[source]
add_stream(bundle_type, swhid: swh.model.swhids.CoreSWHID, content_iter)[source]
get_stream(bundle_type, swhid: swh.model.swhids.CoreSWHID)[source]
is_cached(bundle_type, swhid: swh.model.swhids.CoreSWHID)[source]