Add support for "Search API (tags based)" caching in Views

Created on 26 January 2018, almost 7 years ago
Updated 24 January 2024, 11 months ago

Problem/Motivation

After reading a number of issues in the Facets issue queue regarding caching as well as work being done in the Search API (specifically #2753667: Improve Views cache plugin(s) and their cache metadata β†’ ), it is currently unclear what the remaining tasks are to make Facets compatible with Search API caching.

Currently, when a view is configured to 'Caching: None' the search results page is cached by the Internal page cache for anonymous users and the page is not invalidated when the data of a result changes. When the view is configured to 'Caching: Search API (tag based)' the results are invalidated correctly and the facets still seem to work?

Proposed resolution

Identify the issues that need to be resolved to make Facets compatible with Search API caching.

Remaining tasks

To be determined.

User interface changes

To be determined.

API changes

To be determined.

Data model changes

To be determined.

✨ Feature request
Status

Fixed

Version

2.0

Component

Search API integration

Created by

πŸ‡³πŸ‡±Netherlands idebr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States andyg5000 North Carolina, USA

    Thanks to everyone that worked getting this rolled out. I wanted to drop an edge case here for others that may be experiencing an issue I came across:

    If you embed your view in a template like using twig_tweak (e.g. {{ drupal_view('my_view','block_1', term.id) }}), caching on the view will prevent your facets from being displayed. Moving the view earlier in the page building cycle, like normal block placement, resolves the issue and views caching + facets works as it should.

Production build 0.71.5 2024