(PECL memcache >= 2.0.0)
Memcache::setCompressThreshold — 锟斤拷锟斤拷锟斤拷值锟皆讹拷压锟斤拷
$threshold
[, float $min_savings
] ) : boolMemcache::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(20000, 0.2);
/* procedural API */
$memcache_obj = memcache_connect('memcache_host', 11211);
memcache_set_compress_threshold($memcache_obj, 20000, 0.2);
?>