Add cache to templates and pages index