Throw an exception when APC is not loaded but cache is enabled in app config

This commit is contained in:
Joseph Bielawski 2011-05-12 07:44:22 -07:00
parent df67d6a3b1
commit ec3ea65819

View File

@ -10,6 +10,10 @@ class ApcCache implements CacheInterface
public function __construct($prefix)
{
if (!extension_loaded('apc')) {
throw new \RuntimeException('First you need to enable APC extension in your php.ini. In meanwhile you can just remove "cache" option from application configuration.');
}
$this->prefix = $prefix;
}