|
PHP5中文手册
Memcache::set(PECL memcache:0.2-2.1.2) Memcache::set — Store data at the server 说明
bool Memcache::set
( string $key
, mixed $var
[, int $flag
[, int $expire
]] )
Memcache::set() stores an item var with key on the memcached server. Parameter expire is expiration time in seconds. If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time, it could be deleted from the cache to make place for other items). You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib). Also you can use memcache_set() function. 参数
返回值如果成功则返回 TRUE,失败则返回 FALSE。 范例
Example#1 Memcache::set() example
<?php Example#2 Memcache::set() example
<?php 参见
|