Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: apc_fetch - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

apc_load_constants" width="11" height="7"/> <apc_delete
Last updated: Thu, 31 May 2007

view this page in

apc_fetch

(PECL apc:3.0.0-3.0.9)

apc_fetch — 格納されている変数をキャッシュから取得する

説明

mixed apc_fetch ( string $key )

パラメータ

key

apc_store() を用いて)値を格納する際に 使用された key

返り値

成功した場合に格納されていた変数、失敗した場合に FALSE を返します。

例 209. apc_fetch() の例

<?php
$bar
= 'BAR';
apc_store('foo', $bar);
var_dump(apc_fetch('foo'));
?>

上の例の出力は以下となります。


string(3) "BAR"

    

参考

apc_store()
apc_delete()



add a note add a note User Contributed Notes
apc_fetch
thijsterlouw at gmail dot com_remove_this
28-Feb-2007 06:31
As of version 3.0.13 APC (released 2007-02-24) you can perform multiple key fetches with apc_fetch. Very useful to further optimize your application!
APC changelog:
http://pecl.php.net/package-changelog.php?package=APC

example:

<?php
apc_store
('key1', 'value1');
apc_store('key2', 'value2');

$keys = array('key1','key2');
$result = apc_fetch($keys);  //fetch multiple keys at once!

var_dump($result);
?>

apc_load_constants" width="11" height="7"/> <apc_delete
Last updated: Thu, 31 May 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites