You are here

public function QueryHelper::removeResults in Search API 8

Removes the result set with the given search ID from the cache.

Parameters

string $search_id: The search ID.

Overrides QueryHelperInterface::removeResults

File

src/Utility/QueryHelper.php, line 121

Class

QueryHelper
Provides methods for creating search queries and statically caching results.

Namespace

Drupal\search_api\Utility

Code

public function removeResults($search_id) {
  $results = $this->results[$this
    ->getCurrentRequest()];
  unset($results[$search_id]);
  $this->results[$this
    ->getCurrentRequest()] = $results;
}