By tstoeckler on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
To allow the the serialization to be swapped for more performant implementations, the database cache backend no longer hardcodes using PHP's serialize() / unserialize() for serialization, but allows passing in a serializer. By default PHP's serializer is passed in. The igbinary module provides alternate serializers which may improve performance.
// DatabaseBackendFactory::get() before this change
return new DatabaseBackend($this->connection, $this->checksumProvider, $bin, $max_rows);
// DatabaseBackendFactory::get() after this change.
return new DatabaseBackend($this->connection, $this->checksumProvider, $bin, $this->serializer, $max_rows);
These constructors were also affected by https://www.drupal.org/node/3387233
# Database cache backend in core.services.yml
cache.backend.database:
class: Drupal\Core\Cache\DatabaseBackendFactory
arguments: ['@database', '@cache_tags.invalidator.checksum', '@settings', '@serialization.phpserialize']
# Example database cache backend with igbinary module
cache.backend.database:
class: Drupal\Core\Cache\DatabaseBackendFactory
arguments: ['@database', '@cache_tags.invalidator.checksum', '@settings', '@serialization.igbinary']
Other change notices for same issue
Impacts:
Module developers