You are here

public function SpellCheck::postExecute in Search API Spellcheck 8

Saves the solr response to the cache

Parameters

$values:

Overrides HandlerBase::postExecute

File

src/Plugin/views/area/SpellCheck.php, line 98

Class

SpellCheck
Provides an area for messages.

Namespace

Drupal\search_api_spellcheck\Plugin\views\area

Code

public function postExecute(&$values) {

  /** @var ResultSetInterface $result */
  $result = $this->query
    ->getSearchApiResults();
  $response = $result
    ->getExtraData('search_api_solr_response');
  $tags = $this
    ->getCache()
    ->getCacheTags();
  \Drupal::cache(self::SPELLCHECK_CACHE_BIN)
    ->set($this
    ->getCacheKey(), $response, Cache::PERMANENT, $tags);
  parent::postExecute($values);
}