<?php
$mem = new Memcache();
$flag = $mem -> connect('localhost',11211);
$mem -> set('color','red',0,30);//
$mem -> set('age',23,0,time()+30);//this code does not work because of "time()"
代码时间()不起作用
我的代码运行结果。
答案 0 :(得分:0)
从Redis更新到Memcache,
$ mem - &gt; set('color','red',0,31 * 60 * 60 * 24);
根据文档,
http://php.net/manual/en/memcache.set.php
希望它有所帮助。