cinder.image.cache module¶
-
class
ImageVolumeCache
(db, volume_api, max_cache_size_gb: int = 0, max_cache_size_count: int = 0)¶ Bases:
object
-
create_cache_entry
(context: cinder.context.RequestContext, volume_ref: cinder.objects.volume.Volume, image_id: str, image_meta: dict) → dict¶ Create a new cache entry for an image.
This assumes that the volume described by volume_ref has already been created and is in an available state.
-
ensure_space
(context: cinder.context.RequestContext, volume: cinder.objects.volume.Volume) → bool¶ Makes room for a volume cache entry.
Returns True if successful, false otherwise.
-
evict
(context: cinder.context.RequestContext, cache_entry: dict) → None¶
-
get_by_image_volume
(context: cinder.context.RequestContext, volume_id: str)¶
-
get_entry
(context: cinder.context.RequestContext, volume_ref: cinder.objects.volume.Volume, image_id: str, image_meta: dict) → Optional[dict]¶
-