Skip to content

Commit

Permalink
Fixed ApcStorage::isAvailable()
Browse files Browse the repository at this point in the history
That `apc` extension is loaded may not mean it is enabled (with `apc.enable` for webserver or `apc.enable_cli` for CLI).
  • Loading branch information
jakubkulhan committed Aug 19, 2010
1 parent 27b2922 commit 25483eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Nette/Caching/ApcStorage.php
Expand Up @@ -46,7 +46,7 @@ class ApcStorage implements ICacheStorage
*/
public static function isAvailable()
{
return extension_loaded('apc');
return extension_loaded('apc') && @apc_cache_info() !== FALSE;
}


Expand Down Expand Up @@ -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
}

}
}

0 comments on commit 25483eb

Please sign in to comment.