Skip to content

Commit 5e87e71

Browse files
author
Magnar Eivind Martinsen
committed
Updated caching of block for fixing problems for anonymous users
1 parent 3301bec commit 5e87e71

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

metsis/metsis_search/src/Plugin/Block/SearchMapBlock.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,6 @@ public function build() {
392392
'#allowed_tags' => ['div'],
393393
];
394394

395-
// Set the cache for this form.
396-
/* $build['#cache'] = [
397-
'contexts' => [
398-
'url.query_args',
399-
],
400-
];
401-
*/
402395
// Add CSS and JS libraries and drupalSettings JS variables.
403396
$build['#attached'] = [
404397
'library' => [
@@ -410,7 +403,7 @@ public function build() {
410403
// Cache settings for the block.
411404
$build['#cache'] = [
412405
'max-age' => Cache::PERMANENT,
413-
'contexts' => ['url'],
406+
'contexts' => ['url.query_args'],
414407
'tags' => ['metsis_search_map'],
415408
];
416409
$settings = [

0 commit comments

Comments
 (0)