Debian still uses APC 3.1.3-pl2, "apc_exists" was introduced in 3.1.4,
so i made a workaround with apc_fetch (returns false if nothing found).
* Creates a new ApcCacheSource object.
*/
public function __construct() {
- if (!function_exists('apc_exists')) {
+ if (!function_exists('apc_store')) {
throw new SystemException('APC support is not enabled.');
}
}
* @see CacheSource::get()
*/
public function get($cacheResource) {
- if (!apc_exists($cacheResource['file'])) {
+ if (false === $data = apc_fetch($cacheResource['file'])) {
return null;
}
- return apc_fetch($cacheResource['file']);
+ return $data;
}
/**