From 25483ebf16943f8ebf025d96edc2846c50e3aae2 Mon Sep 17 00:00:00 2001 From: Jakub Kulhan Date: Thu, 19 Aug 2010 22:23:50 +0200 Subject: [PATCH] Fixed ApcStorage::isAvailable() That `apc` extension is loaded may not mean it is enabled (with `apc.enable` for webserver or `apc.enable_cli` for CLI). --- Nette/Caching/ApcStorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nette/Caching/ApcStorage.php b/Nette/Caching/ApcStorage.php index 83e8edbd97..acbd300c2d 100644 --- a/Nette/Caching/ApcStorage.php +++ b/Nette/Caching/ApcStorage.php @@ -46,7 +46,7 @@ class ApcStorage implements ICacheStorage */ public static function isAvailable() { - return extension_loaded('apc'); + return extension_loaded('apc') && @apc_cache_info() !== FALSE; } @@ -187,4 +187,4 @@ private function _normalizeKey(&$key) $key = $this->prefix . str_replace("\x00", '~', $key); // due http://pecl.php.net/bugs/bug.php?id=17597 } -} \ No newline at end of file +}