Caching immediately and returning the cached image.