src/components/autocomplete/js/autocompleteController.js
function handleQuery () {
    var searchText = $scope.searchText || '';
    var term = searchText.toLowerCase();

    // If caching is enabled and the current searchText is stored in the cache
    if (!$scope.noCache && cache[term]) {
      // The results should be handled as same as a normal un-cached request does.
      handleResults(cache[term]);
    } else {
      fetchResults(searchText);
    }

    ctrl.hidden = shouldHide();
  }
function handleQuery () {
    var searchText = $scope.searchText || '';
    var term = searchText.toLowerCase();

    // If caching is enabled and the current searchText is stored in the cache
    if (!$scope.noCache && cache[term]) {
      // The results should be handled as same as a normal un-cached request does.
      handleResults(cache[term]);
    } else {
      fetchResults(searchText);
    }

    ctrl.hidden = shouldHide();
  }
function handleQuery ( ) { var searchText = $scope . searchText || '' ; var term = searchText . toLowerCase ( ) ; // If caching is enabled and the current searchText is stored in the cache if ( ! $scope . noCache && cache [ term ] ) { // The results should be handled as same as a normal un-cached request does. handleResults ( cache [ term ] ) ; } else { fetchResults ( searchText ) ; } ctrl . hidden = shouldHide ( ) ; }
Starts the query to gather the results for the current searchText.  Attempts to return cached
results first, then forwards the process to `fetchResults` if necessary.
Starts the query to gather the results for the current searchText . Attempts to return cached results first then forwards the process to fetchResults if necessary .