remove onExpire debug function
add active template to cache