Fixed issue where cache was ignoring template directory