Verify that the configured service exists before calling it in CacheFactory

Created on 19 February 2015, almost 10 years ago
Updated 20 September 2024, 3 months ago

Problem/Motivation

It is now necessary that a module is enabled, so that the service exists to use it.

I don't think that is bad but I think we could handle the fact that the service doesn't exist much more nicely and simply fall back to the default if not provided.

Proposed resolution

In CacheFactory::get(), check if the specified service in $cache_settings exists before calling it (bin specific and default). Don't check the default backends. Should be possible to simply specify that inline in the existing if cases.

Add a hook_requirements() to tell people something is wrong.

Remaining tasks

User interface changes

API changes

🐛 Bug report
Status

Needs review

Version

10.2

Component
Cache 

Last updated 2 days ago

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024