diff --git a/core/modules/views/src/Plugin/views/access/AccessPluginBase.php b/core/modules/views/src/Plugin/views/access/AccessPluginBase.php index 06a5798..10ce3a3 100644 --- a/core/modules/views/src/Plugin/views/access/AccessPluginBase.php +++ b/core/modules/views/src/Plugin/views/access/AccessPluginBase.php @@ -60,6 +60,12 @@ public function summaryTitle() { * The route to change. */ public function alterRouteDefinition(Route $route) { + // Views access plugins can change through configuration whether a user has + // access to a resource or not, so we have to add a cache tag on the route + // in order to allow cache tag invalidation to clear the page cache for this + // view (e.g. when a 403 views resource is cached for a subset of users and + // the access plugin configuration is changed, the cached 403 output has to + // be invalidated). $route->setOption('cache_tags', $this->view->storage->getCacheTags()); }