File: 054.phpt

package info (click to toggle)
php-memcache 3.0.9~20170802.e702b5f-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,172 kB
  • sloc: ansic: 9,126; php: 1,015; xml: 760; sh: 3; makefile: 1
file content (23 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
memcache->set() with value larger than MTU
--SKIPIF--
<?php include 'connect.inc'; if (!MEMCACHE_HAVE_SESSION) print 'skip not compiled with session support'; if (empty($domainsocket)) print 'skip $domainsocket not set'; ?>
--FILE--
<?php

include 'connect.inc';

ini_set('memcache.chunk_size', 32768);
$memcache->setCompressThreshold(1000000, 1.0);

$value = str_repeat('a', 64 * 1024);
$result = $memcache->set('test_key', $value, 0, 2);
var_dump($result);

$result2 = $memcache->get('test_key');
var_dump(strlen($result2));

?>
--EXPECTF--
bool(true)
int(65536)