You are here

public function SearchApiCachePluginTrait::getCacheBackend in Search API 8

Retrieves the cache backend.

Return value

\Drupal\Core\Cache\CacheBackendInterface The cache backend.

File

src/Plugin/views/cache/SearchApiCachePluginTrait.php, line 45

Class

SearchApiCachePluginTrait
Provides a trait to use in Views cache plugins for Search API queries.

Namespace

Drupal\search_api\Plugin\views\cache

Code

public function getCacheBackend() {
  return $this->cacheBackend ?: \Drupal::cache($this->resultsBin);
}