# glance.api.v2.cached_images module

Controller for Image Cache Management API

class glance.api.v2.cached_images.CacheController(db_api=None, policy_enforcer=None, notifier=None, store_api=None)

  Bases: `object`

  A controller for managing cached images.

  clear_cache(req)

    DELETE /cache - Clear cache and queue

    Removes all images from cache and queue.

  delete_cache_entry(req, image_id)

    DELETE /cache/<IMAGE_ID> - Remove image from cache

    Removes the image from cache or queue.

  delete_cached_image(req, image_id)

    DELETE /cached_images/<IMAGE_ID>

    Removes an image from the cache.

  delete_cached_images(req)

    DELETE /cached_images - Clear all active cached images

    Removes all images from the cache.

  delete_queued_image(req, image_id)

    DELETE /queued_images/<IMAGE_ID>

    Removes an image from the cache.

  delete_queued_images(req)

    DELETE /queued_images - Clear all active queued images

    Removes all images from the cache.

  get_cache_state(req)

    GET /cache/ - Get currently cached and queued images

    Returns dict of cached and queued images

  get_cached_images(req)

    GET /cached_images

    Returns a mapping of records about cached images.

  get_queued_images(req)

    GET /queued_images

    Returns a mapping of records about queued images.

  image_exists_in_cache(image_id)
  queue_image(req, image_id)

    PUT /queued_images/<IMAGE_ID>

    Queues an image for caching. We do not check to see if the image is in the registry here. That is done by the prefetcher…

  queue_image_from_api(req, image_id)

    PUT /cache/<IMAGE_ID>

    Queues an image for caching. We do not check to see if the image is in the registry here. That is done by the prefetcher…

class glance.api.v2.cached_images.CachedImageDeserializer

  Bases: `glance.common.wsgi.JSONRequestDeserializer`

class glance.api.v2.cached_images.CachedImageSerializer

  Bases: `glance.common.wsgi.JSONResponseSerializer`

  clear_cache(response, result)
  delete_cache_entry(response, result)
  queue_image_from_api(response, result)

glance.api.v2.cached_images.create_resource()

  Cached Images resource factory method

this page last updated: 2026-03-19 02:17:34

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug