mirror of
https://github.com/php-win-ext/php-memcached.git
synced 2026-03-24 00:52:18 +01:00
According to memcached wiki, touch is added since 1.4.8
https://github.com/memcached/memcached/wiki/ReleaseNotes148
This commit is contained in:
@@ -66,3 +66,8 @@ function memc_create_combinations ($name, $serializer, $ignore_object_type = fal
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function memc_get_version($memc, $host = '') {
|
||||
$version = $memc->getVersion();
|
||||
return array_pop($version);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ Memcached store, fetch & touch expired key
|
||||
--XFAIL--
|
||||
https://code.google.com/p/memcached/issues/detail?id=275
|
||||
--SKIPIF--
|
||||
<?php include dirname(__FILE__) . "/skipif.inc";
|
||||
<?php
|
||||
$min_version = "1.4.8";
|
||||
include dirname(__FILE__) . "/skipif.inc";
|
||||
if (!method_exists("memcached", "touch")) die ("skip memcached::touch is not available");
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Test for bug 155
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$min_version = "1.4.8";
|
||||
include dirname(__FILE__) . "/skipif.inc";
|
||||
if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x01000016) die ('skip too old libmemcached');
|
||||
?>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
--TEST--
|
||||
Test for Github issue #77
|
||||
--SKIPIF--
|
||||
<?php include dirname(__FILE__) . "/skipif.inc";
|
||||
if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x01000016) die ('skip too old libmemcached');
|
||||
<?php
|
||||
$min_version = "1.4.8";
|
||||
include dirname(__FILE__) . "/skipif.inc";
|
||||
if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x01000016) die ('skip too old libmemcached');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -5,6 +5,12 @@ if (!extension_loaded("memcached")) {
|
||||
|
||||
include dirname(__FILE__) . "/config.inc";
|
||||
|
||||
if (memc_get_instance() === NULL) {
|
||||
if (($m = memc_get_instance()) === NULL) {
|
||||
die ("skip can not connect to server\n");
|
||||
}
|
||||
|
||||
if (isset($min_version)) {
|
||||
if (version_compare(memc_get_version($m), $min_version, "<")) {
|
||||
die("skip version of server pool is too old, $min_version is required\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
--TEST--
|
||||
Touch in binary mode
|
||||
--SKIPIF--
|
||||
<?php include dirname(__FILE__) . "/skipif.inc";
|
||||
if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x01000016) die ('skip too old libmemcached');
|
||||
<?php
|
||||
$min_version = "1.4.8"; //TOUCH is added since 1.4.8
|
||||
include dirname(__FILE__) . "/skipif.inc";
|
||||
if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x01000016) die ('skip too old libmemcached');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user