Since the caching of facets in combination with Search API and Views has been improved, we should offer some more features.
Right now the cacheable metadata is gathered from the view, the search api query and facets' processors.
This works quite well for the defaults, but there's no possibility to force a more aggressive caching.
For example the language, the query parameters or the user's rights are mostly set as cache context.
Especially in cases you display a facet without the rendered source it might be possible to cache the facet regardless of these contexts.
So we should provide a possibility to force specific metadata.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkalkbrenner created an issue. See original summary.

mkalkbrenner’s picture

Status: Active » Needs review
FileSize
4.3 KB
mkalkbrenner’s picture

FileSize
4.32 KB
mkalkbrenner’s picture

Title: Dispatch an event to adjust cacheable metadata before set on a facet » Dispatch an event to adjust cacheable metadata after a facet is built
FileSize
4.16 KB

Here's a better approach.

mkalkbrenner’s picture

FileSize
6.64 KB

Wrong patch. Here's the right one.

mkalkbrenner’s picture

FileSize
4.32 KB
mkalkbrenner’s picture

FileSize
4.3 KB

  • mkalkbrenner committed 3c4b657 on 2.0.x
    Issue #3282075 by mkalkbrenner: Dispatch an event to adjust cacheable...
mkalkbrenner’s picture

Status: Needs review » Fixed

  • mkalkbrenner committed 0dac302 on 2.0.x
    Issue #3282075 by mkalkbrenner: Dispatch an event to adjust cacheable...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.