Converted post_render function to post_render_cache function for d8