试图从命名空间 "Doctrine\Common\Cache" 调用函数 "apc_fetch"
Attempted to call function "apc_fetch" from namespace "Doctrine\Common\Cache"
我已经在我的服务器上安装了 APC,想知道我是否遗漏了其他东西。我希望能够缓存第 3 方 API 请求。
code -
$cache = new \Doctrine\Common\Cache\ApcCache();
$data = $cache->fetch('namesaved');
if($data === false) {
$cache->save('namesaved','keyword');
}
returns -
Attempted to call function "apc_fetch" from namespace
"Doctrine\Common\Cache" in vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php line 40.
您收到此错误是因为找不到函数 apc_fetch。这意味着 APC 未(正确)安装,或者模块未加载到 PHP 配置中。
我已经在我的服务器上安装了 APC,想知道我是否遗漏了其他东西。我希望能够缓存第 3 方 API 请求。
code -
$cache = new \Doctrine\Common\Cache\ApcCache();
$data = $cache->fetch('namesaved');
if($data === false) {
$cache->save('namesaved','keyword');
}
returns -
Attempted to call function "apc_fetch" from namespace
"Doctrine\Common\Cache" in vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php line 40.
您收到此错误是因为找不到函数 apc_fetch。这意味着 APC 未(正确)安装,或者模块未加载到 PHP 配置中。