Deprecation: #81460 - Deprecate getByTag() on cache frontends¶
See forge#81460
Description¶
The method get
on \TYPO3\
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 flush
and flush
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 String
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 flush
or flush
. 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.