Memcache::setCompressThreshold

(PECL memcache >= 2.0.0)

Memcache::setCompressThreshold锟斤拷锟斤拷锟斤拷值锟皆讹拷压锟斤拷

说锟斤拷

Memcache::setCompressThreshold ( int $threshold [, float $min_savings ] ) : bool

Memcache::setCompressThreshold()锟斤拷锟斤拷锟斤拷锟节达拷值锟斤拷锟皆讹拷压锟斤拷锟斤拷 同锟斤拷锟斤拷也锟斤拷锟斤拷使锟矫猴拷锟斤拷memcache_set_compress_threshold()锟斤拷

Note:

锟剿猴拷锟斤拷锟斤拷memcache2.0.0锟斤拷锟诫。

锟斤拷锟斤拷

threshold

锟斤拷锟狡讹拷锟街碉拷锟斤拷锟斤拷远锟窖癸拷锟斤拷锟斤拷锟街碉拷锟�

min_saving

指锟斤拷锟斤拷锟斤拷压锟斤拷实锟绞存储锟斤拷值锟斤拷压锟斤拷锟绞o拷支锟街碉拷值锟斤拷锟斤拷锟斤拷0锟斤拷1之锟戒。默锟斤拷值锟斤拷0.2锟斤拷示20%压锟斤拷锟绞★拷

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

锟斤拷锟斤拷

Example #1 Memcache::setCompressThreshold() 示锟斤拷

<?php

/* OO API */

$memcache_obj = new Memcache;
$memcache_obj->addServer('memcache_host'11211);
$memcache_obj->setCompressThreshold(200000.2);

/* procedural API */

$memcache_obj memcache_connect('memcache_host'11211);
memcache_set_compress_threshold($memcache_obj200000.2);

?>