diff --git a/core/core.services.yml b/core/core.services.yml
index 9b9c80b..b7e363f 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -25,6 +25,8 @@ services:
   cache.backend.database:
     class: Drupal\Core\Cache\DatabaseBackendFactory
     arguments: ['@database']
+  cache.backend.php:
+    class: Drupal\Core\Cache\PhpBackendFactory
   cache.bootstrap:
     class: Drupal\Core\Cache\CacheBackendInterface
     tags:
diff --git a/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php b/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
index bfb7a2a..92924a1 100644
--- a/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
@@ -83,4 +83,30 @@ function writeable() {
   public function deleteAll() {
     return FALSE;
   }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getPath($name) {
+    return $this->getFullPath($name);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function listAll() {
+    $names = array();
+    if (file_exists($this->directory)) {
+      foreach (new \DirectoryIterator($this->directory) as $fileinfo) {
+        if (!$fileinfo->isDot()) {
+          $name = $fileinfo->getFilename();
+          if ($name != '.htaccess') {
+            $names[] = $name;
+          }
+        }
+      }
+    }
+    return $names;
+  }
+
 }
diff --git a/core/lib/Drupal/Component/PhpStorage/FileStorage.php b/core/lib/Drupal/Component/PhpStorage/FileStorage.php
index 33604f1..0eb2502 100644
--- a/core/lib/Drupal/Component/PhpStorage/FileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/FileStorage.php
@@ -202,6 +202,13 @@ protected function getFullPath($name) {
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function getPath($name) {
+    return $this->getFullPath($name);
+  }
+
+  /**
    * Implements Drupal\Component\PhpStorage\PhpStorageInterface::writeable().
    */
   public function writeable() {
@@ -248,4 +255,23 @@ protected function unlink($path) {
     // If there's nothing to delete return TRUE anyway.
     return TRUE;
   }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function listAll() {
+    $names = array();
+    if (file_exists($this->directory)) {
+      foreach (new \DirectoryIterator($this->directory) as $fileinfo) {
+        if (!$fileinfo->isDot()) {
+          $name = $fileinfo->getFilename();
+          if ($name != '.htaccess') {
+            $names[] = $name;
+          }
+        }
+      }
+    }
+    return $names;
+  }
+
 }
diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
index 6545b91..8b5561d 100644
--- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
@@ -151,6 +151,17 @@ protected function getFullPath($name, &$directory = NULL, &$directory_mtime = NU
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function delete($name) {
+    $path = $this->getContainingDirectoryFullPath($name);
+    if (file_exists($path)) {
+      return $this->unlink($path);
+    }
+    return FALSE;
+  }
+
+  /**
    * Returns the full path of the containing directory where the file is or should be stored.
    */
   protected function getContainingDirectoryFullPath($name) {
diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php
index b9dd5b0..573e23c 100644
--- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php
@@ -65,4 +65,12 @@ protected function checkFile($name) {
     $filename = $this->getFullPath($name, $directory, $directory_mtime);
     return file_exists($filename) && filemtime($filename) <= $directory_mtime ? $filename : FALSE;
   }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getPath($name) {
+    return $this->checkFile($name);
+  }
+
 }
diff --git a/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php b/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php
index 03ca812..e1b0649 100644
--- a/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php
+++ b/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php
@@ -78,4 +78,25 @@ public function delete($name);
    * Removes all files in this bin.
    */
   public function deleteAll();
+
+  /**
+   * Gets the full file path.
+   *
+   * @param string $name
+   *   The virtual file name. Can be a relative path.
+   *
+   * @return string|FALSE
+   *   The full file path for the provided name. Return FALSE if the
+   *   implementation needs to prevent access to the file.
+   */
+  public function getPath($name);
+
+  /**
+   * Lists all the files in the storage.
+   *
+   * @return array
+   *   Array of filenames.
+   */
+  public function listAll();
+
 }
diff --git a/core/lib/Drupal/Core/Cache/PhpBackend.php b/core/lib/Drupal/Core/Cache/PhpBackend.php
new file mode 100644
index 0000000..71349c0
--- /dev/null
+++ b/core/lib/Drupal/Core/Cache/PhpBackend.php
@@ -0,0 +1,278 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Core\Cache\PhpBackend.
+ */
+
+namespace Drupal\Core\Cache;
+
+use Drupal\Core\PhpStorage\PhpStorageFactory;
+use Drupal\Component\Utility\Variable;
+
+/**
+ * Defines a PHP cache implementation.
+ *
+ * Stores cache items in a PHP file using a storage that implements
+ * Drupal\Component\PhpStorage\PhpStorageInterface.
+ *
+ * @ingroup cache
+ */
+class PhpBackend implements CacheBackendInterface {
+
+  /**
+   * @var string
+   */
+  protected $bin;
+
+  /**
+   * Array to store cache objects.
+   */
+  protected $cache = array();
+
+  /**
+   * Constructs a PhpBackend object.
+   *
+   * @param string $bin
+   *   The cache bin for which the object is created.
+   */
+  public function __construct($bin) {
+    $this->bin = 'cache_' . $bin;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function get($cid, $allow_invalid = FALSE) {
+    if ($file = $this->storage()->getPath($cid)) {
+      $cache = @include $file;
+    }
+    if (isset($cache)) {
+      return $this->prepareItem($cache, $allow_invalid);
+    }
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setMultiple(array $items) {
+    foreach ($items as $cid => $item) {
+      $this->set($cid, $item['data'], isset($item['expire']) ? $item['expire'] : CacheBackendInterface::CACHE_PERMANENT, isset($item['tags']) ? $item['tags'] : array());
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getMultiple(&$cids, $allow_invalid = FALSE) {
+    $ret = array();
+
+    foreach ($cids as $cid) {
+      if ($item = $this->get($cid, $allow_invalid)) {
+        $ret[$item->cid] = $item;
+      }
+    }
+
+    $cids = array_diff($cids, array_keys($ret));
+
+    return $ret;
+  }
+
+  /**
+   * Prepares a cached item.
+   *
+   * Checks that items are either permanent or did not expire, and returns data
+   * as appropriate.
+   *
+   * @param object $cache
+   *   An item loaded from cache_get() or cache_get_multiple().
+   *
+   * @return mixed
+   *   The item with data as appropriate or FALSE if there is no
+   *   valid item to load.
+   */
+  protected function prepareItem($cache, $allow_invalid) {
+    if (!isset($cache->data)) {
+      return FALSE;
+    }
+
+    // Check expire time.
+    $cache->valid = $cache->expire == Cache::PERMANENT || $cache->expire >= REQUEST_TIME;
+
+    if (!$allow_invalid && !$cache->valid) {
+      return FALSE;
+    }
+
+    return $cache;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) {
+    $item = (object) array(
+      'cid' => $cid,
+      'data' => $data,
+      'created' => REQUEST_TIME,
+      'expire' => $expire,
+    );
+    $item->tags = $this->flattenTags($tags);
+    $this->writeItem($cid, $item);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function delete($cid) {
+    $this->storage()->delete($cid);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function deleteMultiple(array $cids) {
+    foreach ($cids as $cid) {
+      $this->delete($cid);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function deleteTags(array $tags) {
+    $flat_tags = $this->flattenTags($tags);
+    foreach ($this->storage()->listAll() as $cid) {
+      $item = $this->get($cid);
+      if (is_object($item) && array_intersect($flat_tags, $item->tags)) {
+        $this->delete($cid);
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function deleteAll() {
+    $this->storage()->deleteAll();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function invalidate($cid) {
+    if ($item = $this->get($cid)) {
+      $item->expire = REQUEST_TIME - 1;
+      $this->writeItem($cid, $item);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function invalidateMultiple(array $cids) {
+    foreach ($cids as $cid) {
+      $this->invalidate($cid);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function invalidateTags(array $tags) {
+    $flat_tags = $this->flattenTags($tags);
+    foreach ($this->storage()->listAll() as $cid) {
+      $item = $this->get($cid);
+      if ($item && array_intersect($flat_tags, $item->tags)) {
+        $this->invalidate($cid);
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function invalidateAll() {
+    $this->invalidateMultiple($this->storage()->listAll());
+  }
+
+  /**
+   * 'Flattens' a tags array into an array of strings.
+   *
+   * @param array $tags
+   *   Associative array of tags to flatten.
+   *
+   * @return array
+   *   An indexed array of strings.
+   */
+  protected function flattenTags(array $tags) {
+    if (isset($tags[0])) {
+      return $tags;
+    }
+
+    $flat_tags = array();
+    foreach ($tags as $namespace => $values) {
+      if (is_array($values)) {
+        foreach ($values as $value) {
+          $flat_tags[] = "$namespace:$value";
+        }
+      }
+      else {
+        $flat_tags[] = "$namespace:$values";
+      }
+    }
+    return $flat_tags;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isEmpty() {
+    $names = $this->storage()->listAll();
+    return empty($names);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function garbageCollection() {
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function removeBin() {
+    $this->cache = array();
+    $this->storage()->delete($this->bin);
+  }
+
+  /**
+   * Writes a cache item to PhpStorage.
+   *
+   * @param string $cid
+   *   The cache ID of the data to store.
+   * @param \stdClass $item
+   *   The cache item to store.
+   */
+  protected function writeItem($cid, \stdClass $item) {
+    $data = str_replace('\\', '\\\\', serialize($item));
+    $content = "<?php return unserialize(<<<EOF
+$data
+EOF
+);";
+    $this->storage()->save($cid, $content);
+  }
+
+  /**
+   * Gets the PHP code storage object to use.
+   *
+   * @return \Drupal\Core\PhpStorage\PhpStorageInterface
+   */
+  protected function storage() {
+    if (!isset($this->storage)) {
+      $this->storage = PhpStorageFactory::get($this->bin);
+    }
+    return $this->storage;
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Cache/PhpBackendFactory.php b/core/lib/Drupal/Core/Cache/PhpBackendFactory.php
new file mode 100644
index 0000000..0801b72
--- /dev/null
+++ b/core/lib/Drupal/Core/Cache/PhpBackendFactory.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Cache\PhpBackendFactory.
+ */
+
+namespace Drupal\Core\Cache;
+
+class PhpBackendFactory implements CacheFactoryInterface {
+
+  /**
+   * Gets PhpBackend for the specified cache bin.
+   *
+   * @param $bin
+   *   The cache bin for which the object is created.
+   *
+   * @return \Drupal\Core\Cache\PhpBackend
+   *   The cache backend object for the specified cache bin.
+   */
+  function get($bin) {
+    return new PhpBackend($bin);
+  }
+
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php
index 9002314..b390429 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php
@@ -136,10 +136,11 @@ public function testSetGet() {
     $backend = $this->getCacheBackend();
 
     $this->assertIdentical(FALSE, $backend->get('test1'), "Backend does not contain data for cache id test1.");
-    $backend->set('test1', 7);
+    $with_backslash = array('foo' => '\Drupal\foo\Bar');
+    $backend->set('test1', $with_backslash);
     $cached = $backend->get('test1');
     $this->assert(is_object($cached), "Backend returned an object for cache id test1.");
-    $this->assertIdentical(7, $cached->data);
+    $this->assertIdentical($with_backslash, $cached->data);
     $this->assertTrue($cached->valid, 'Item is marked as valid.');
     $this->assertEqual($cached->created, REQUEST_TIME, 'Created time is correct.');
     $this->assertEqual($cached->expire, Cache::PERMANENT, 'Expire time is correct.');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/PhpBackendUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/PhpBackendUnitTest.php
new file mode 100644
index 0000000..6258550
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/PhpBackendUnitTest.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\system\Tests\Cache\PhpBackendUnitTest.
+ */
+
+namespace Drupal\system\Tests\Cache;
+
+use Drupal\Core\Cache\PhpBackend;
+
+/**
+ * Tests PhpBackendUnitTest using GenericCacheBackendUnitTestBase.
+ */
+class PhpBackendUnitTest extends GenericCacheBackendUnitTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Php cache backend',
+      'description' => 'Unit test of the PHP cache backend using the generic cache unit test base.',
+      'group' => 'Cache',
+    );
+  }
+
+  /**
+   * Creates a new instance of MemoryBackend.
+   *
+   * @return
+   *   A new MemoryBackend object.
+   */
+  protected function createCacheBackend($bin) {
+    return new PhpBackend($bin);
+  }
+
+}
