Updated template caching system