Files
php-memcached/tests/set_large.phpt
Robert e39a2e62f4 Add option to locally enforce payload size limit (#515)
Add a configuration option to enforce an item size limit on the client side. This avoids sending large items
over the wire and getting rejected by the server which can cause delays. The default is 0 for no limit.
The same error code RES_E2BIG is used for the client side limit as for the server side limit.
2023-04-27 08:48:49 -07:00

20 lines
382 B
PHP

--TEST--
set large data
--SKIPIF--
<?php include "skipif.inc";?>
--FILE--
<?php
include dirname (__FILE__) . '/config.inc';
$m = memc_get_instance (array (
Memcached::OPT_ITEM_SIZE_LIMIT => 0,
));
$key = 'foobarbazDEADC0DE';
$value = str_repeat("foo bar", 1024 * 1024);
var_dump($m->set($key, $value, 360));
var_dump($m->get($key) === $value);
?>
--EXPECT--
bool(true)
bool(true)