The render function should be adapted below to use the new cache method.