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>:<object_id>’) as the internal identifiers used in the underlying objstorage.

add(obj_type, obj_id, content)[source]
get(obj_type, obj_id)[source]
delete(obj_type, obj_id)[source]
add_stream(obj_type, obj_id, content_iter)[source]
get_stream(obj_type, obj_id)[source]
is_cached(obj_type, obj_id)[source]