diff --git a/core/modules/views/config/schema/views.schema.yml b/core/modules/views/config/schema/views.schema.yml index 2a19267..ea1bc38 100644 --- a/core/modules/views/config/schema/views.schema.yml +++ b/core/modules/views/config/schema/views.schema.yml @@ -119,7 +119,7 @@ views.view.*: label: 'Cache metadata' mapping: max_age: - type: boolean + type: integer label: 'Cache maximum age' contexts: type: sequence diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 75f371e..2a6e43e 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -2294,10 +2294,10 @@ public function calculateCacheMetadata () { /** @var \Drupal\views\Plugin\views\cache\CachePluginBase $cache_plugin */ if ($cache_plugin = $this->getPlugin('cache')) { - $cache_plugin->alterCacheMetadata($is_cacheable, $cache_contexts, $cache_tags); + $cache_plugin->alterCacheMetadata($max_age, $cache_contexts, $cache_tags); } - return [$is_cacheable, $cache_contexts]; + return [$max_age, $cache_contexts]; } /**