PHP速度大放送(3)
来源:未知 责任编辑:责任编辑 发表时间:2015-03-01 01:33 点击:次
$memcache->connect(‘localhost’, 11211) or die (“Could not connect”);
$version = $memcache->getVersion();
echo “Server’s version: “.$version.”\n”;
$tmp_object = new stdClass;
$tmp_object->str_attr = ‘test’;
$tmp_object->int_attr = 123;
$memcache->set(‘key’, $tmp_object, false, 10) or die (“Failed to save data at the server”);
echo “Store data in the cache (data will expire in 10 seconds)\n”;
相关新闻>>
- 发表评论
-
- 最新评论 更多>>