cinder.image.cache module¶
- class ImageVolumeCache(db, volume_api, max_cache_size_gb: int = 0, max_cache_size_count: int = 0, clone_across_pools: bool = False)¶
Bases:
object
- create_cache_entry(context: RequestContext, volume_ref: 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: RequestContext, volume: Volume) bool ¶
Makes room for a volume cache entry.
Returns True if successful, false otherwise.
- evict(context: RequestContext, cache_entry: dict) None ¶
- get_by_image_volume(context: RequestContext, volume_id: str)¶
- get_entry(context: RequestContext, volume_ref: Volume, image_id: str, image_meta: dict) dict | None ¶