Making the template cache persistent