Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

Cache bin service definitions need to be updated!

Various places in core have presumed a service called cache.$bin defines the cache for $bin and also there were places which presumed these services always use the same definition. Both of these problems have been mitigated, a small change is required for a cache bin service definition: the cache.bin tag also needs the name of the bin specified as well.

Before:

  cache.render:
    class: Drupal\Core\Cache\CacheBackendInterface
    tags:
      - { name: cache.bin }
    factory: ['@cache_factory', 'get']
    arguments: [render]

After:

  cache.render:
    class: Drupal\Core\Cache\CacheBackendInterface
    tags:
      - { name: cache.bin, bin: render }
    factory: ['@cache_factory', 'get']
    arguments: [render]

The service name now does not matter.

Also, a new \Drupal\Core\Cache\DelegatedCacheFactory service has been introduced. This is useful in situations where your code
may need to use different bins based on input.

Impacts: 
Module developers