From ffe811935cebb673926e09ffafacf7cb69866269 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 20 Jun 2014 16:07:47 -0400 Subject: [PATCH] Remove else. By returning early we can avoid the else statement entirely. --- lib/Cake/Cache/Engine/ApcEngine.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Cache/Engine/ApcEngine.php b/lib/Cake/Cache/Engine/ApcEngine.php index 7fa644b24..5c154e6d8 100644 --- a/lib/Cake/Cache/Engine/ApcEngine.php +++ b/lib/Cake/Cache/Engine/ApcEngine.php @@ -132,12 +132,12 @@ class ApcEngine extends CacheEngine { APC_ITER_NONE ); apc_delete($iterator); - } else { - $cache = apc_cache_info('user'); - foreach ($cache['cache_list'] as $key) { - if (strpos($key['info'], $this->settings['prefix']) === 0) { - apc_delete($key['info']); - } + return true; + } + $cache = apc_cache_info('user'); + foreach ($cache['cache_list'] as $key) { + if (strpos($key['info'], $this->settings['prefix']) === 0) { + apc_delete($key['info']); } } return true;