該文檔提供以下方法來APC緩存:
//Cache data for 2 days
$frontCache = new Phalcon\Cache\Frontend\Data(array(
'lifetime' => 172800
));
$cache = new Phalcon\Cache\Backend\Apc($frontCache, array(
'prefix' => 'app-data'
));
//Cache arbitrary data
$cache->save('my-data', array(1, 2, 3, 4, 5));
//Get data
$data = $cache->get('my-data');
這似乎不是簡單地做
apc_store('my-data', array(1, 2, 3, 4, 5), 172800);
apc_fetch('my-data');
請澄清frontCache超級簡單的方法和「前綴」鍵過於複雜。該文檔在緩存區域中有一點需要。