add cache package and implement memory cache