diff --git a/core/core.services.yml b/core/core.services.yml
index 9d6ad2711a..137faa13cd 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -193,7 +193,7 @@ services:
       - [setContainer, ['@service_container']]
   cache.backend.database:
     class: Drupal\Core\Cache\DatabaseBackendFactory
-    arguments: ['@database', '@cache_tags.invalidator.checksum', '@settings']
+    arguments: ['@database', '@cache_tags.invalidator.checksum', '@settings', '@serialization.phpserialize']
   cache.backend.apcu:
     class: Drupal\Core\Cache\ApcuBackendFactory
     arguments: ['@app.root', '@site.path', '@cache_tags.invalidator.checksum']
diff --git a/core/lib/Drupal/Component/Serialization/ObjectAwareSerializationInterface.php b/core/lib/Drupal/Component/Serialization/ObjectAwareSerializationInterface.php
new file mode 100644
index 0000000000..18560f1455
--- /dev/null
+++ b/core/lib/Drupal/Component/Serialization/ObjectAwareSerializationInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Drupal\Component\Serialization;
+
+/**
+ * Ensures that a serializer is usable for serializing PHP objects.
+ *
+ * Other Serializers that implement the SerializationInterface, for example
+ * serializers that use JSON or YAML, are suitable for different PHP types
+ * except objects. Serializers that implement the
+ * ObjectAwareSerializationInterface instead are clearly indicating that they're
+ * suitable for PHP objects, for example using the PHP string serialization
+ * format or the igbinary format.
+ */
+interface ObjectAwareSerializationInterface extends SerializationInterface {
+}
diff --git a/core/lib/Drupal/Component/Serialization/PhpSerialize.php b/core/lib/Drupal/Component/Serialization/PhpSerialize.php
index 1f7e03d75b..a5e47220cc 100644
--- a/core/lib/Drupal/Component/Serialization/PhpSerialize.php
+++ b/core/lib/Drupal/Component/Serialization/PhpSerialize.php
@@ -5,7 +5,7 @@
 /**
  * Default serialization for serialized PHP.
  */
-class PhpSerialize implements SerializationInterface {
+class PhpSerialize implements ObjectAwareSerializationInterface {
 
   /**
    * {@inheritdoc}
diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
index cb8b099c18..6cf07270cc 100644
--- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php
+++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\Core\Cache;
 
+use Drupal\Component\Serialization\ObjectAwareSerializationInterface;
 use Drupal\Component\Assertion\Inspector;
 use Drupal\Component\Utility\Crypt;
 use Drupal\Core\Database\Connection;
@@ -46,6 +47,12 @@ class DatabaseBackend implements CacheBackendInterface {
    */
   protected $bin;
 
+  /**
+   * The serializer to use.
+   *
+   * @var \Drupal\Component\Serialization\ObjectAwareSerializationInterface
+   */
+  protected $serializer;
 
   /**
    * The database connection.
@@ -73,8 +80,10 @@ class DatabaseBackend implements CacheBackendInterface {
    * @param int $max_rows
    *   (optional) The maximum number of rows that are allowed in this cache bin
    *   table.
+   * @param \Drupal\Component\Serialization\ObjectAwareSerializationInterface $serializer
+   *   (optional) The serializer to use.
    */
-  public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin, $max_rows = NULL) {
+  public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin, $max_rows = NULL, ObjectAwareSerializationInterface $serializer = NULL) {
     // All cache tables should be prefixed with 'cache_'.
     $bin = 'cache_' . $bin;
 
@@ -82,6 +91,11 @@ public function __construct(Connection $connection, CacheTagsChecksumInterface $
     $this->connection = $connection;
     $this->checksumProvider = $checksum_provider;
     $this->maxRows = $max_rows === NULL ? static::DEFAULT_MAX_ROWS : $max_rows;
+    if (!$serializer) {
+      @trigger_error('Calling DatabaseBackend::__construct() without the $serializer argument is deprecated in drupal:8.8.0 and the $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688', E_USER_DEPRECATED);
+      $serializer = \Drupal::service('serialization.phpserialize');
+    }
+    $this->serializer = $serializer;
   }
 
   /**
@@ -164,7 +178,7 @@ protected function prepareItem($cache, $allow_invalid) {
 
     // Unserialize and return the cached data.
     if ($cache->serialized) {
-      $cache->data = unserialize($cache->data);
+      $cache->data = $this->serializer->decode($cache->data);
     }
 
     return $cache;
@@ -242,7 +256,7 @@ protected function doSetMultiple(array $items) {
       }
 
       if (!is_string($item['data'])) {
-        $fields['data'] = serialize($item['data']);
+        $fields['data'] = $this->serializer->encode($item['data']);
         $fields['serialized'] = 1;
       }
       else {
diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php b/core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php
index 175639444c..d53189c7c7 100644
--- a/core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php
+++ b/core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php
@@ -2,11 +2,19 @@
 
 namespace Drupal\Core\Cache;
 
+use Drupal\Component\Serialization\ObjectAwareSerializationInterface;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Site\Settings;
 
 class DatabaseBackendFactory implements CacheFactoryInterface {
 
+  /**
+   * The serializer to use.
+   *
+   * @var \Drupal\Component\Serialization\ObjectAwareSerializationInterface
+   */
+  protected $serializer;
+
   /**
    * The database connection.
    *
@@ -37,13 +45,20 @@ class DatabaseBackendFactory implements CacheFactoryInterface {
    *   The cache tags checksum provider.
    * @param \Drupal\Core\Site\Settings $settings
    *   (optional) The site settings.
+   * @param \Drupal\Component\Serialization\ObjectAwareSerializationInterface $serializer
+   *   (optional) The serializer to use.
    *
    * @throws \BadMethodCallException
    */
-  public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, Settings $settings = NULL) {
+  public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, Settings $settings = NULL, ObjectAwareSerializationInterface $serializer = NULL) {
     $this->connection = $connection;
     $this->checksumProvider = $checksum_provider;
     $this->settings = $settings ?: Settings::getInstance();
+    if (!$serializer) {
+      @trigger_error('Calling DatabaseBackendFactory::__construct() without the $serializer argument is deprecated in drupal:8.8.0 and the $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688', E_USER_DEPRECATED);
+      $serializer = \Drupal::service('serialization.phpserialize');
+    }
+    $this->serializer = $serializer;
   }
 
   /**
@@ -57,7 +72,7 @@ public function __construct(Connection $connection, CacheTagsChecksumInterface $
    */
   public function get($bin) {
     $max_rows = $this->getMaxRowsForBin($bin);
-    return new DatabaseBackend($this->connection, $this->checksumProvider, $bin, $max_rows);
+    return new DatabaseBackend($this->connection, $this->checksumProvider, $bin, $max_rows, $this->serializer);
   }
 
   /**
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index b9f7b30613..a85b7a26d9 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -83,12 +83,21 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
       ],
       'cache.container' => [
         'class' => 'Drupal\Core\Cache\DatabaseBackend',
-        'arguments' => ['@database', '@cache_tags_provider.container', 'container', DatabaseBackend::MAXIMUM_NONE],
+        'arguments' => [
+          '@database',
+          '@cache_tags_provider.container',
+          'container',
+          DatabaseBackend::MAXIMUM_NONE,
+          '@serialization.phpserialize',
+        ],
       ],
       'cache_tags_provider.container' => [
         'class' => 'Drupal\Core\Cache\DatabaseCacheTagsChecksum',
         'arguments' => ['@database'],
       ],
+      'serialization.phpserialize' => [
+        'class' => 'Drupal\Component\Serialization\PhpSerialize',
+      ],
     ],
   ];
 
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/ChainedFastBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/ChainedFastBackendTest.php
index a93b674d5c..a186ba1712 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/ChainedFastBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/ChainedFastBackendTest.php
@@ -20,7 +20,7 @@ class ChainedFastBackendTest extends GenericCacheBackendUnitTestBase {
    *   A new ChainedFastBackend object.
    */
   protected function createCacheBackend($bin) {
-    $consistent_backend = new DatabaseBackend(\Drupal::service('database'), \Drupal::service('cache_tags.invalidator.checksum'), $bin, 100);
+    $consistent_backend = new DatabaseBackend(\Drupal::service('database'), \Drupal::service('cache_tags.invalidator.checksum'), $bin, 100, \Drupal::service('serialization.phpserialize'));
     $fast_backend = new PhpBackend($bin, \Drupal::service('cache_tags.invalidator.checksum'));
     $backend = new ChainedFastBackend($consistent_backend, $fast_backend, $bin);
     // Explicitly register the cache bin as it can not work through the
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
index 358b92530c..a9c183a8ac 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTest.php
@@ -32,7 +32,7 @@ class DatabaseBackendTest extends GenericCacheBackendUnitTestBase {
    *   A new DatabaseBackend object.
    */
   protected function createCacheBackend($bin) {
-    return new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), $bin, static::$maxRows);
+    return new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), $bin, static::$maxRows, $this->container->get('serialization.phpserialize'));
   }
 
   /**
@@ -89,6 +89,17 @@ public function testGarbageCollection() {
     $this->assertFalse($backend->get('test0'));
   }
 
+  /**
+   * Tests the deprecation error triggering when the serializer param is missed.
+   *
+   * @group legacy
+   * @expectedDeprecation Calling DatabaseBackend::__construct() without the $serializer argument is deprecated in drupal:8.8.0 and the $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688
+   */
+  public function testDeprecationErrorTriggering() {
+    $this->assertNotEmpty((new DatabaseBackend($this->container->get('database'), $this->container->get('cache_tags.invalidator.checksum'), 'default', static::$maxRows))
+      ->schemaDefinition());
+  }
+
   /**
    * Gets the number of rows in the test cache bin database table.
    *
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
index 885498fcd2..7192048f03 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
@@ -9,6 +9,7 @@
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\user\Entity\User;
 use Symfony\Component\DependencyInjection\Reference;
+use Drupal\Component\Serialization\PhpSerialize;
 
 /**
  * Tests that cache tag invalidation queries are delayed to the end of transactions.
@@ -51,11 +52,13 @@ protected function setUp() {
   public function register(ContainerBuilder $container) {
     parent::register($container);
 
+    $container->register('serializer', PhpSerialize::class);
     // Register a database cache backend rather than memory-based.
     $container->register('cache_factory', DatabaseBackendFactory::class)
       ->addArgument(new Reference('database'))
       ->addArgument(new Reference('cache_tags.invalidator.checksum'))
-      ->addArgument(new Reference('settings'));
+      ->addArgument(new Reference('settings'))
+      ->addArgument(new Reference('serializer'));
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
index f0f430e2c8..39af173bb7 100644
--- a/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
@@ -74,7 +74,8 @@ public function register(ContainerBuilder $container) {
     $container->register('cache_factory', 'Drupal\Core\Cache\DatabaseBackendFactory')
       ->addArgument(new Reference('database'))
       ->addArgument(new Reference('cache_tags.invalidator.checksum'))
-      ->addArgument(new Reference('settings'));
+      ->addArgument(new Reference('settings'))
+      ->addArgument(new Reference('serialization.phpserialize'));
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php
index e8c50a7409..293768b5df 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/CachedStorageTest.php
@@ -88,7 +88,8 @@ public function containerBuild(ContainerBuilder $container) {
     // Use the regular database cache backend to aid testing.
     $container->register('cache_factory', 'Drupal\Core\Cache\DatabaseBackendFactory')
       ->addArgument(new Reference('database'))
-      ->addArgument(new Reference('cache_tags.invalidator.checksum'));
+      ->addArgument(new Reference('cache_tags.invalidator.checksum'))
+      ->addArgument(new Reference('serialization.phpserialize'));
   }
 
 }
diff --git a/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php b/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
index 9d5ac4bdf9..5d9005ec75 100644
--- a/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
@@ -2,12 +2,15 @@
 
 namespace Drupal\Tests\Core\Cache;
 
+use Drupal\Component\Serialization\PhpSerialize;
 use Drupal\Core\Cache\CacheTagsChecksumInterface;
 use Drupal\Core\Cache\DatabaseBackend;
 use Drupal\Core\Cache\DatabaseBackendFactory;
 use Drupal\Core\Database\Connection;
+use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\Site\Settings;
 use Drupal\Tests\UnitTestCase;
+use Symfony\Component\DependencyInjection\Definition;
 
 /**
  * @coversDefaultClass \Drupal\Core\Cache\DatabaseBackendFactory
@@ -24,13 +27,31 @@ public function testGet(array $settings, $expected_max_rows_foo, $expected_max_r
     $database_backend_factory = new DatabaseBackendFactory(
       $this->prophesize(Connection::class)->reveal(),
       $this->prophesize(CacheTagsChecksumInterface::class)->reveal(),
-      new Settings($settings)
+      new Settings($settings),
+      new PhpSerialize()
     );
 
     $this->assertSame($expected_max_rows_foo, $database_backend_factory->get('foo')->getMaxRows());
     $this->assertSame($expected_max_rows_bar, $database_backend_factory->get('bar')->getMaxRows());
   }
 
+  /**
+   * Tests the deprecation error triggering when the serializer param is missed.
+   *
+   * @group legacy
+   * @expectedDeprecation Calling DatabaseBackendFactory::__construct() without the $serializer argument is deprecated in drupal:8.8.0 and the $serializer argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3014688
+   */
+  public function testDeprecationErrorTriggering() {
+    $container = new ContainerBuilder();
+    $container->setDefinition('serialization.phpserialize', new Definition(new PhpSerialize()));
+    \Drupal::setContainer($container);
+    new DatabaseBackendFactory(
+      $this->prophesize(Connection::class)->reveal(),
+      $this->prophesize(CacheTagsChecksumInterface::class)->reveal(),
+      new Settings([])
+    );
+  }
+
   public function getProvider() {
     return [
       'default' => [
