From 57af29e4ee52f51bffd8e8f563342d4c521764c9 Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski <t.motylewski@gmail.com> Date: Tue, 27 Oct 2020 22:56:04 +0100 Subject: [PATCH] [TASK] Add page ID prefix to page cache and lock identifiers This make it easier to debug/monitor cache/lock related issues. Resolves: #92724 Releases: master Change-Id: I045232a988db57a62304d7a8903ed8118ec1f8c3 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66327 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> --- .../Classes/Controller/TypoScriptFrontendController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index 39aa315a4c0d..00723858081d 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -1670,27 +1670,27 @@ class TypoScriptFrontendController implements LoggerAwareInterface * This hash is unique to the template, the variables ->id, ->type, list of fe user groups, ->MP (Mount Points) and cHash array * Used to get and later store the cached data. * - * @return string MD5 hash of serialized hash base from createHashBase() + * @return string MD5 hash of serialized hash base from createHashBase(), prefixed with page id * @see getFromCache() * @see getLockHash() */ protected function getHash() { - return md5($this->createHashBase(false)); + return $this->id . '_' . md5($this->createHashBase(false)); } /** * Calculates the lock-hash * This hash is unique to the above hash, except that it doesn't contain the template information in $this->all. * - * @return string MD5 hash + * @return string MD5 hash prefixed with page id * @see getFromCache() * @see getHash() */ protected function getLockHash() { $lockHash = $this->createHashBase(true); - return md5($lockHash); + return $this->id . '_' . md5($lockHash); } /** -- GitLab