diff --git a/typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php b/typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php
index 3bc421d424bb6495bf9876f762c1d9a3de9383de..72f2cf8f6dc5fca7842a234ce0b001d47fb4b0c7 100644
--- a/typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php
+++ b/typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php
@@ -141,6 +141,15 @@ abstract class AbstractFrontend implements FrontendInterface
             throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233057359);
         }
 
+        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']['flushByTag'])
+            && count($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']['flushByTag']) > 0
+        ) {
+            trigger_error(
+                'The hook "t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php" "flushByTag" has been marked as deprecated and will be removed with TYPO3 v13. Use a custom frontend instead.',
+                E_USER_DEPRECATED
+            );
+        }
+
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']['flushByTag'] ?? [] as $_funcRef) {
             $params = ['tag' => $tag];
             GeneralUtility::callUserFunction($_funcRef, $params, $this);
diff --git a/typo3/sysext/core/Documentation/Changelog/12.2/Deprecation-99592-DeprecatedFlushByTagHook.rst b/typo3/sysext/core/Documentation/Changelog/12.2/Deprecation-99592-DeprecatedFlushByTagHook.rst
new file mode 100644
index 0000000000000000000000000000000000000000..5260d252f9212a19c856d8c5a7de9853be507159
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/12.2/Deprecation-99592-DeprecatedFlushByTagHook.rst
@@ -0,0 +1,36 @@
+.. include:: /Includes.rst.txt
+
+.. _deprecation-99592-1674033859:
+
+==================================================
+Deprecation: #99592 - Deprecated "flushByTag" hook
+==================================================
+
+See :issue:`99592`
+
+Description
+===========
+
+The hook :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']['flushByTag']`
+has been marked as deprecated, since the recommended way for custom cache
+functionality is to implement a custom cache frontend, using the
+:ref:`Frontend API<t3coreapi:caching-frontend>`.
+
+Impact
+======
+
+Any hook implementation registered won't be executed anymore
+in TYPO3 v13. The extension scanner will report possible usages.
+
+Affected installations
+======================
+
+All installations making use of the deprecated hook.
+
+Migration
+=========
+
+Migrate corresponding functionality in the :php:`flushByTag()` method of your
+own cache frontend implementation.
+
+.. index:: PHP-API, FullyScanned, ext:core
diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
index 1edb3099de1924c4897516c2a93b40a9f7fae7ef..e95ba373d6094d7c2ccae037b75040418f1640ba 100644
--- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
+++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
@@ -956,4 +956,9 @@ return [
             'Deprecation-99586-RegistrationOfUpgradeWizardsViaGLOBALS.rst',
         ],
     ],
+    '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php\'][\'flushByTag\']' => [
+        'restFiles' => [
+            'Deprecation-99592-DeprecatedFlushByTagHook.rst',
+        ],
+    ],
 ];