add cache in front-end side and some optimization