Skip to content

Commit

Permalink
Remove Exceptions on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
artemdigi committed Nov 21, 2017
1 parent 2dd08fc commit c0d67eb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions AcceleratorCacheClearer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public static function clearCache($user = true, $opcode = true)
*/
private static function clearUserCache()
{
if (function_exists('wincache_ucache_clear') && wincache_ucache_clear()) {
return 'Wincache User Cache: success.';
}

if (function_exists('apcu_clear_cache') && apcu_clear_cache()) {
return 'APC User Cache: success.';
}
Expand All @@ -69,11 +73,7 @@ private static function clearUserCache()
return 'XCache User Cache: success.';
}

if (function_exists('wincache_ucache_clear') && wincache_ucache_clear()) {
return 'Wincache User Cache: success.';
}

throw new \RuntimeException('User Cache: failure.');
return 'User Cache: failure.';
}

/**
Expand All @@ -98,6 +98,6 @@ private static function clearOpcodeCache()
return 'XCache Opcode Cache: success.';
}

throw new \RuntimeException('Opcode Cache: failure.');
return 'Opcode Cache: failure.';
}
}

0 comments on commit c0d67eb

Please sign in to comment.