'Supply data about an image, by either inspecting it or returning
cached data if available.
:param unicode image: The ID of the image.
:return: ``dict`` representing data about the image properties.'

def _image_data(self, image):

    cached_image = self._image_cache.get(image)
    if (cached_image is not None):
        LOG_CACHED_IMAGE(image=image).write()
        return cached_image
    try:
        image_data = self._client.inspect_image(image)
        Message.new(message_type='flocker:node:docker:image_inspected', image=image).write()
    except APIError as e:
        if (e.response.status_code == NOT_FOUND):
            Message.new(message_type='flocker:node:docker:image_not_found', image=image).write()
            image_data = {u'Config': {u'Env': [], u'Cmd': []}}
        else:
            raise
    cached_data = ImageDataCache(command=image_data[u'Config'][u'Cmd'], environment=image_data[u'Config'][u'Env'])
    self._image_cache.put(image, cached_data)
    Message.new(message_type='flocker:node:docker:image_data_cached', image=image).write()
    return cached_data
