protected function __construct() { $prefix = mfwApplication::cachePrefix(); session_name("{$prefix}seskey"); $this->prefix = mfwApplication::cachePrefix(); session_start(); }
public static function deletePrefixMatch($keyprefix) { $keyprefix = mfwApplication::cachePrefix() . $keyprefix; $keyprefix = preg_quote($keyprefix, '/'); $it = new APCIterator('user', "/^{$keyprefix}/", APC_ITER_KEY); foreach ($it as $i) { apc_delete($i['key']); } }
/** * prefixを付加したキーを生成. */ protected static function makeKey($key) { $prefix = mfwApplication::cachePrefix(); return "{$prefix}{$key}"; }