From 8b2c26774fb8a56e4250689e2ce43b6c9d0f411d Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 28 Oct 2024 14:59:57 +0100 Subject: [PATCH] user_materio user_block cache max-age 0 --- .../custom/materio_user/src/Plugin/Block/UserBlock.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/modules/custom/materio_user/src/Plugin/Block/UserBlock.php b/web/modules/custom/materio_user/src/Plugin/Block/UserBlock.php index 5ee87b3a..69ec4b2f 100644 --- a/web/modules/custom/materio_user/src/Plugin/Block/UserBlock.php +++ b/web/modules/custom/materio_user/src/Plugin/Block/UserBlock.php @@ -50,6 +50,11 @@ class UserBlock extends BlockBase implements ContainerFactoryPluginInterface{ */ public function build() { $build = []; + + $build['#cache'] = [ + 'max-age' => 0, + ]; + // dpm($this->user); if($this->user->id()){ $user_url = Url::fromRoute('entity.user.canonical', ['user' => $this->user->id()]); @@ -76,6 +81,8 @@ class UserBlock extends BlockBase implements ContainerFactoryPluginInterface{ ) ) ); + + } return $build; }