Issue Bug Closed

#86874VariableFrontend treats all Backends like TaggableBackendInterface-Backends

Alexander Schnitzler 11/07/18, 11:11 updated 10/17/26, 09:52

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

  1. Georg Ringer commented and changed status New Closed <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 implementing TaggableBackendInterface. 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 a SimpleFileBackend.

    The remaining tag related frontend methods handle backends without tag support gracefully: AbstractFrontend::flushByTag() and flushByTags() return silently if the backend is not a TaggableBackendInterface, and VariableFrontend::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!