<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_FastDS_APC extends vB_FastDS { protected function getValue($prefix, $keys) { $success = null; if (is_array($keys)) { $apcKeys = array(); foreach($keys AS $key) { if (is_string($key)) { $apcKeys[$key] = $this->prefix . $prefix . $key; } } $apc = apc_fetch($apcKeys, $success); if (!$success) { return false; } $result = array(); foreach($apcKeys AS $key => $apcKey) { if (isset($apc[$apcKey])) { $result[$key] = $apc[$apcKey]; } } return $result; } $apc = apc_fetch($this->prefix . $prefix . $keys, $success); if ($success) { return $apc; } return false; } protected function setValue($key, $value) { return apc_store($this->prefix . $key, $value); } protected function clearValue($key) { return apc_delete($this->prefix . $key); } } 