We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
setCacheKey
xxh3
1 parent 2d238aa commit 3912946Copy full SHA for 3912946
src/Mvc/Controller/Traits/Query/Cache.php
@@ -100,10 +100,14 @@ public function initializeCacheKey(): void
100
$this->getModelName(),
101
$this->getCacheLifetime(),
102
$this->identity->getUserId(),
103
- md5(json_encode($this->getParams()) ?: ''),
104
]);
105
- $cacheKey = '_' . implode('-', $cacheKeys) . '_';
106
- $this->setCacheKey($cacheKey);
+
+ $jsonParams = json_encode($this->getParams(), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
+ if (!empty($jsonParams)) {
107
+ $cacheKeys[] = hash('xxh3', $jsonParams);
108
+ }
109
110
+ $this->setCacheKey('_' . implode('-', $cacheKeys) . '_');
111
}
112
113
/**
0 commit comments