Problem/Motivation

Some Views may be rendered without any caching or with suboptimal cache settings, causing repeated heavy database queries and rendering work on every request, which negatively impacts performance under load.

Steps to reproduce

Proposed resolution

Add a new Performance FitCheck plugin ViewsCachingCheck that:

  • Scans all Views and their displays to detect those with caching disabled or using default “no cache” settings for results and/or rendered output.
  • Fails with FitWeight::Medium when Views with significant query/render cost have no caching configured, listing the affected Views so administrators can enable appropriate time-based or tag-based caching.
  • Provides a short help message recommending enabling Views result/output caching (and, where appropriate, Views Content Cache or similar) following Drupal’s performance best practices.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork drupalfit-3558984

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

harivansh created an issue. See original summary.

harivansh’s picture

Issue summary: View changes

shubham.prakash made their first commit to this issue’s fork.

shubham.prakash’s picture

Status: Active » Needs review
shubham.prakash’s picture

Title: Add check to ensure views are cache properly. » Add check to ensure views are cached properly.

harivansh’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

harivansh’s picture

Status: Fixed » Closed (fixed)