diff --git a/core/lib/Drupal/Core/Cache/ApcBackend.php b/core/lib/Drupal/Core/Cache/APCBackend.php similarity index 96% rename from core/lib/Drupal/Core/Cache/ApcBackend.php rename to core/lib/Drupal/Core/Cache/APCBackend.php index d257167..c4c480f 100644 --- a/core/lib/Drupal/Core/Cache/ApcBackend.php +++ b/core/lib/Drupal/Core/Cache/APCBackend.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\Core\Cache\ApcBackend. + * Contains Drupal\Core\Cache\APCBackend. */ namespace Drupal\Core\Cache; @@ -13,7 +13,7 @@ * Stores cache items in the Alternative PHP Cache (APC). Each cache bin * corresponds to a prefix of the APC variable with the same name. */ -class ApcBackend implements CacheBackendInterface { +class APCBackend implements CacheBackendInterface { /** * @var string @@ -127,7 +127,7 @@ public static function getPrefix($bin) { * @return string * The APC key for the cache item ID. */ - protected function getApcKey($cid) { + protected function getAPCKey($cid) { return $this->binPrefix . $cid; } @@ -135,7 +135,7 @@ protected function getApcKey($cid) { * Implements Drupal\Core\Cache\CacheBackendInterface::get(). */ public function get($cid) { - $cache = apc_fetch($this->getApcKey($cid)); + $cache = apc_fetch($this->getAPCKey($cid)); return $this->prepareItem($cache); } @@ -146,7 +146,7 @@ public function getMultiple(&$cids) { // Translate the requested cache item IDs to APC keys. $map = array(); foreach ($cids as $cid) { - $map[$this->getApcKey($cid)] = $cid; + $map[$this->getAPCKey($cid)] = $cid; } $result = apc_fetch(array_keys($map)); @@ -228,21 +228,21 @@ public function set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANEN // apc_store()'s $ttl argument can be omitted but also set to 0 (zero), // which happens to be identical to CACHE_PERMANENT. - apc_store($this->getApcKey($cid), $cache, $expire); + apc_store($this->getAPCKey($cid), $cache, $expire); } /** * Implements Drupal\Core\Cache\CacheBackendInterface::delete(). */ public function delete($cid) { - apc_delete($this->getApcKey($cid)); + apc_delete($this->getAPCKey($cid)); } /** * Implements Drupal\Core\Cache\CacheBackendInterface::deleteMultiple(). */ public function deleteMultiple(array $cids) { - apc_delete(array_map(array($this, 'getApcKey'), $cids)); + apc_delete(array_map(array($this, 'getAPCKey'), $cids)); } /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/ApcBackendUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/APCBackendUnitTest.php similarity index 87% rename from core/modules/system/lib/Drupal/system/Tests/Cache/ApcBackendUnitTest.php rename to core/modules/system/lib/Drupal/system/Tests/Cache/APCBackendUnitTest.php index db50165..0c2b085 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Cache/ApcBackendUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Cache/APCBackendUnitTest.php @@ -2,12 +2,12 @@ /** * @file - * Contains Drupal\system\Tests\Cache\ApcBackendUnitTest. + * Contains Drupal\system\Tests\Cache\APCBackendUnitTest. */ namespace Drupal\system\Tests\Cache; -use Drupal\Core\Cache\ApcBackend; +use Drupal\Core\Cache\APCBackend; /** * Tests the APC cache backend. @@ -23,7 +23,7 @@ * might be possible to flush them in a tearDown() override method in this * class though. */ -class ApcBackendUnitTest extends GenericCacheBackendUnitTestBase { +class APCBackendUnitTest extends GenericCacheBackendUnitTestBase { public static function getInfo() { return array( @@ -50,6 +50,6 @@ protected function checkRequirements() { } protected function createCacheBackend($bin) { - return new ApcBackend($bin); + return new APCBackend($bin); } }