implemented cache template