\Drupal\views\Plugin\views\argument\ArgumentPluginBase should allow subplugins to specify a more specific url cache context

Created on 30 June 2015, over 9 years ago
Updated 19 April 2024, 8 months ago

Problem/Motivation

From #2501905-2: \Drupal\views\Plugin\views\argument_default\QueryParameter should specify a more specific cache context :

  public function getCacheContexts() {
    $contexts = [];
    // By definition arguments depends on the URL.
    // @todo Once contexts are properly injected into block views we could pull
    //   the information from there.
    $contexts[] = 'url';

Currently, adding an argument to a view makes the view cacheable per url even if the argument value depends only on a single query argument value.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Views 

Last updated 2 days ago

Created by

🇫🇮Finland olli

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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