diff --git a/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php b/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php
index bbc4e3d..97a201b 100644
--- a/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php
+++ b/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\Cache;
 
-use \Drupal\Component\Utility\Crypt;
+use Drupal\Core\Site\Settings;
 
 class ApcuBackendFactory implements CacheFactoryInterface {
 
@@ -34,7 +34,7 @@ class ApcuBackendFactory implements CacheFactoryInterface {
    *   The cache tags checksum provider.
    */
   public function __construct($root, CacheTagsChecksumInterface $checksum_provider) {
-    $this->sitePrefix = Crypt::hashBase64($root . '/' . conf_path());
+    $this->sitePrefix = Settings::getApcuPrefix('apcu_backend', $root, conf_path());
     $this->checksumProvider = $checksum_provider;
   }
 
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 557dfd1..0b73972 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -249,9 +249,8 @@ public static function createFromRequest(Request $request, $class_loader, $envir
     // loader.
     if ($class_loader_class == get_class($class_loader)
         && Settings::get('class_loader_auto_detect', TRUE)
-        && Settings::get('hash_salt', FALSE)
         && function_exists('apc_fetch')) {
-      $prefix = 'drupal.' . hash('sha256', 'drupal.' . Settings::getHashSalt());
+      $prefix = Settings::getApcuPrefix('class_loader', $core_root);
       $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
       $class_loader->unregister();
       $apc_loader->register();
diff --git a/core/lib/Drupal/Core/Site/Settings.php b/core/lib/Drupal/Core/Site/Settings.php
index a48946a..18f55ff 100644
--- a/core/lib/Drupal/Core/Site/Settings.php
+++ b/core/lib/Drupal/Core/Site/Settings.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\Site;
 
+use Drupal\Component\Utility\Crypt;
 use Drupal\Core\Database\Database;
 
 /**
@@ -148,4 +149,31 @@ public static function getHashSalt() {
     return $hash_salt;
   }
 
+  /**
+   * Generates a prefix for APC user cache keys.
+   *
+   * A standardized prefix is useful to allow visual inspection of an APC user
+   * cache. By default, this method will produce a unique prefix per site using
+   * the hash salt. If the setting 'apcu_ensure_unique_prefix' is set to FALSE
+   * then if the caller does not provide a $site_path only the Drupal root will
+   * be used. This allows WebTestBase to use the same prefix ensuring that the
+   * number of APC items created during a full test run is kept to a minimum.
+   * Additionally, if a multi site implementation does not use site specific
+   * module directories setting apcu_ensure_unique_prefix would allow the sites
+   * to share APC cache items.
+   *
+   * @param $identifier
+   *   An identifier for the prefix. For example, 'class_loader' or
+   *   'cache_backend'.
+   *
+   * @return string
+   *   The prefix for APC user cache keys.
+   */
+  public static function getApcuPrefix($identifier, $root, $site_path = '') {
+    if (static::get('apcu_ensure_unique_prefix', TRUE)) {
+      return 'drupal.' . $identifier . '.' . hash_hmac('sha256', $identifier, static::get('hash_salt', $root . '/' . $site_path));
+    }
+    return 'drupal.' . $identifier . '.' . Crypt::hashBase64($root . '/' . $site_path);
+  }
+
 }
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index de20658..2cb12aa 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -834,6 +834,10 @@ protected function setUp() {
       'value' => $this->originalProfile,
       'required' => TRUE,
     );
+    $settings['settings']['apcu_ensure_unique_prefix'] = (object) array(
+      'value' => FALSE,
+      'required' => TRUE,
+    );
     $this->writeSettings($settings);
     // Allow for test-specific overrides.
     $settings_testing_file = DRUPAL_ROOT . '/' . $this->originalSite . '/settings.testing.php';
