Cleans up any invalid cache entries
Bases: glance.common.client.BaseClient
Returns a new client Glance client object based on common kwargs. If an option isn’t specified falls back to common environment variable defaults.
Prefetches images into the Image Cache
Prunes the Image Cache
LRU Cache for Image Data
Bases: object
Provides an LRU cache for image data.
Cache an image file.
Parameters: |
|
---|---|
Returns: | True if image file was cached, False otherwise |
Cache an image with supplied iterator.
Parameters: |
|
---|---|
Returns: | True if image file was cached, False otherwise |
Cleans up any invalid or incomplete cached images. The cache driver decides what that means...
Configure the driver for the cache and, if it fails to configure, fall back to using the SQLite driver which has no odd dependencies
Removes all cached image files and any attributes about the images and returns the number of cached image files that were deleted.
Removes all queued image files and any attributes about the images and returns the number of queued image files that were deleted.
Removes a specific cached image file and any attributes about the image
Parameters: | image_id – Image ID |
---|
Removes a specific queued image file and any attributes about the image
Parameters: | image_id – Image ID |
---|
Returns an iterator that caches the contents of an image while the image contents are read through the supplied iterator.
Parameters: |
|
---|
Return the number of hits that an image has
Parameters: | image_id – Opaque image identifier |
---|
Return the size of the image file for an image with supplied identifier.
Parameters: | image_id – Image ID |
---|
Returns a list of image IDs that are in the queue. The list should be sorted by the time the image ID was inserted into the queue.
Returns True if the image with the supplied ID has its image file cached.
Parameters: | image_id – Image ID |
---|
Returns True if the image identifier is in our cache queue.
Parameters: | image_id – Image ID |
---|
Open and yield file for reading the image file for an image with supplied identifier.
Parameters: | image_id – Image ID |
---|