template update
add func cache
add expire to cachefunc