add cache for restful api