Deprecation: #81460 - Deprecate getByTag() on cache frontends

See forge#81460

Description

The method getByTag($tag) on TYPO3\CMS\Core\Cache\Frontend\FrontendInterface and all implementations have been deprecated with no alternative planned. This is done because the concept of cache tags were originally designed for invalidation purposes, not for identification and retrieval.

Cache frontends still support the much more efficient flushByTag and flushByTags methods to perform invalidation by tag, rather than use the deprecated method to retrieve a list of identifiers and removing each.

Impact

Calling this method on any TYPO3 provided cache frontend implementations triggers a deprecation log entry, with the exception of StringFrontend which has itself been deprecated in a separate patch.

Affected Installations

Avoid usage of the method - if necessary, use the same cache to store a list of identifiers for each tag.

Migration

Where possible, switch to flushByTag or flushByTags. In cases where you depend on getting identifiers by tag, reconsider your business logic - and if necessary, keep track of which identifiers use a given tag, using a separate list that you for example store in the cache alongside the usual cached entries.