From 494061de82442d4c95c35b424301be69ab1dfe76 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 11 Oct 2025 22:33:50 +0200 Subject: [PATCH] Cache/Fixup * correct miscData offset for tooltips introduced in 3edac3c77a10990465713629d4372e0624cb1800 * fix generating cache key for item upgrade searches --- includes/components/response/baseresponse.class.php | 8 +++++++- includes/components/response/textresponse.class.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/components/response/baseresponse.class.php b/includes/components/response/baseresponse.class.php index 137741d8..37761981 100644 --- a/includes/components/response/baseresponse.class.php +++ b/includes/components/response/baseresponse.class.php @@ -323,11 +323,17 @@ trait TrSearch public function getCacheKeyComponents() : array { + $misc = $this->query . // can be empty for upgrade search + serialize($this->_get['wt'] ?? null) . // extra &_GET not expected for normal and opensearch + serialize($this->_get['wtv'] ?? null) . + serialize($this->_get['type'] ?? null) . + serialize($this->_get['slots'] ?? null); + return array( -1, // DBType $this->searchMask, // DBTypeId/category User::$groups, // staff mask - md5($this->query) // misc (here search query) + md5($misc) // misc ); } } diff --git a/includes/components/response/textresponse.class.php b/includes/components/response/textresponse.class.php index 7885af27..ef35a2fd 100644 --- a/includes/components/response/textresponse.class.php +++ b/includes/components/response/textresponse.class.php @@ -20,7 +20,7 @@ trait TrTooltip ); if ($this->enhancedTT) - $key[4] = md5(serialize($this->enhancedTT)); + $key[3] = md5(serialize($this->enhancedTT)); return $key; }