PHP: Memcache::setCompressThreshold - Manual

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

search for in the

Memcache::setServerParams Memcache::set

Last updated: Sat, 27 Jan 2007

view this page in

# Memcache::setCompressThreshold

(no version information, might be only in CVS)

Memcache::setCompressThreshold -- Enable automatic compression of large values

## Описание

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

Memcache::setCompressThreshold() enables automatic compression of large values. You can also use the memcache_set_compress_threshold() function.

> Замечание: This function has been added to Memcache version 2.0.0.

## Список параметров

`threshold`

  Controls the minimum value length before attempting to compress automatically.

`min_saving`

  Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.

## Возвращаемые значения

Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

## Примеры

Пример 1. Memcache::setCompressThreshold() example

`<?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);
?>`

add a note User Contributed Notes
Memcache::setCompressThreshold
There are no user contributed notes for this page.
Memcache::setServerParams Memcache::set

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST