caching results for autocomplete