remove the unseccessary "else"
memory cache for search result