Added support for caching rendered images.