added cache template loading support