Set 'query' to build_info based on conditions and sorts

Created on 11 May 2022, over 2 years ago
Updated 5 August 2024, 6 months ago

Problem/Motivation

The caching plugins do not have cardinality based on the conditions of the View. Search API and the Sql Views query plugins set the build_info['query'] in their build method. We do not.

Steps to reproduce

Try caching. Find caches reused when they shouldn't be.

Proposed resolution

Set appropriate build value by hashing conditions and sorts.

$view->build_info['query'] = serialize($this->where) . ':' . serialize($this->orderby);
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States mglaman WI, USA

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.

Production build 0.71.5 2024