Add caching to the rendering phase.