iTTL : $iTTL); } /** * Delete cache from shared memory * * @param string $sKey - file name * @return result of the operation */ function delData($sKey) { $isSucess = false; apcu_fetch ($sKey, $isSucess); if (!$isSucess) return true; return apcu_delete($sKey); } /** * Check if apc cache functions are available * @return boolean */ function isAvailable() { return function_exists('apcu_store'); } /** * Check if apc extension is loaded * @return boolean */ function isInstalled() { return extension_loaded('apcu'); } /** * remove all data from cache by key prefix * @return true on success */ function removeAllByPrefix ($s) { $l = strlen($s); $aKeys = apcu_cache_info(); if (isset($aKeys['cache_list']) && is_array($aKeys['cache_list'])) { foreach ($aKeys['cache_list'] as $r) { $sKey = $r['info']; if (0 === strncmp($sKey, $s, $l)) $this->delData($sKey); } } return true; } } /** @} */