Throw an exception when APC is not loaded but cache is enabled in app config
This commit is contained in:
parent
df67d6a3b1
commit
ec3ea65819
@ -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;
|
||||
}
|
||||
|
||||
@ -27,4 +31,4 @@ class ApcCache implements CacheInterface
|
||||
{
|
||||
apc_store($this->prefix.$metadata->getClassName(), $metadata);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user