#86874VariableFrontend treats all Backends like TaggableBackendInterface-Backends
Description
The SimpleFileBackend does not implement the TaggableBackendInterface but the VariableFrontend treats all Backends like TaggableBackendInterface-Backends.
Thus, the method getByTag fails with an exception when used with a SimpleFileBackend.
There is clearly no simple solution to it but it’s a bummer when configuring a cache like this and trying to use tags. One approach to fix this is to remove the tag-related methods from the FrontendInterface, introduce a TaggableFrontendInterface and only let custom cache frontends implement the optional TaggableFrontendInterface.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-17T09:52:01+00:00" > 10/17/26, 09:52 </span>
This is obsolete and can be closed.
The exception described here was thrown by
getByTag(), which needs a backend implementingTaggableBackendInterface.FrontendInterface::getByTag()was deprecated in v9 (commit badca6bea60) and removed in v10 (commit 08dedf18206, “Remove deprecated code from Core/Cache”). The method does not exist in the cache frontends anymore, so it cannot fail with aSimpleFileBackend.The remaining tag related frontend methods handle backends without tag support gracefully:
AbstractFrontend::flushByTag()andflushByTags()return silently if the backend is not aTaggableBackendInterface, andVariableFrontend::set()hands the tags over to the backend, which ignores them.Closing as obsolete.
If this is still valid for you in v14, please open a new issue and provide information how to reproduce it. Thanks!