Added some cache to the rendering.