In the README.txt it states:
If you're using Search API views, make sure to disable views cache when using
facets for that view.
I was wondering if this statement is stil valid? I have done some testing and selecting "Search API (tag-based)" cache seems to work just fine or am I missing something?
If I read the comments in SearchApiCachePluginTrait.php correctly facets should still work when a cached result is used:
// Trick Search API into believing a search happened, to make faceting
// et al. work.
/** @var \Drupal\search_api\Query\ResultSetInterface $results */
$results = $cache->data['search_api results'];
$this->getQueryHelper()->addResults($results);
try {
$this->getQuery()->setSearchApiQuery($results->getQuery());
}
catch (SearchApiException $e) {
// Ignore.
}
Comments
Comment #2
damienmckennaThis is being worked on in #2939710: Add support for "Search API (tags based)" caching in Views.