From bd3bab1e567c3540f9391fbf527ab3da4432c03b Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Tue, 25 Jun 2024 08:42:43 +0300 Subject: [PATCH] Add state_cache (Drupal core 10.3) --- src/Reader.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Reader.php b/src/Reader.php index 73bf147..c33df51 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -134,6 +134,11 @@ public function __construct(array $vars) $this->setTrustedHostPatterns(); $this->setDatabaseConnection(); + + // Version specific settings. + if (version_compare($this->getDrupalVersion(), '10.3.0', '>=')) { + $this->settings['state_cache'] = TRUE; + } } public static function get(array $vars): array