diff --git a/src/Illuminate/Cache/ApcWrapper.php b/src/Illuminate/Cache/ApcWrapper.php index 8f6ce488180f..43c6e328a8fe 100755 --- a/src/Illuminate/Cache/ApcWrapper.php +++ b/src/Illuminate/Cache/ApcWrapper.php @@ -4,23 +4,6 @@ class ApcWrapper { - /** - * Indicates if APCu is supported. - * - * @var bool - */ - protected $apcu = false; - - /** - * Create a new APC wrapper instance. - * - * @return void - */ - public function __construct() - { - $this->apcu = function_exists('apcu_fetch'); - } - /** * Get an item from the cache. * @@ -29,7 +12,7 @@ public function __construct() */ public function get($key) { - $fetchedValue = $this->apcu ? apcu_fetch($key, $success) : apc_fetch($key, $success); + $fetchedValue = apcu_fetch($key, $success); return $success ? $fetchedValue : null; } @@ -44,7 +27,7 @@ public function get($key) */ public function put($key, $value, $seconds) { - return $this->apcu ? apcu_store($key, $value, $seconds) : apc_store($key, $value, $seconds); + return apcu_store($key, $value, $seconds); } /** @@ -56,7 +39,7 @@ public function put($key, $value, $seconds) */ public function increment($key, $value) { - return $this->apcu ? apcu_inc($key, $value) : apc_inc($key, $value); + return apcu_inc($key, $value); } /** @@ -68,7 +51,7 @@ public function increment($key, $value) */ public function decrement($key, $value) { - return $this->apcu ? apcu_dec($key, $value) : apc_dec($key, $value); + return apcu_dec($key, $value); } /** @@ -79,7 +62,7 @@ public function decrement($key, $value) */ public function delete($key) { - return $this->apcu ? apcu_delete($key) : apc_delete($key); + return apcu_delete($key); } /** @@ -89,6 +72,6 @@ public function delete($key) */ public function flush() { - return $this->apcu ? apcu_clear_cache() : apc_clear_cache('user'); + return apcu_clear_cache(); } }