I'm currently using memcached, but i'm trying move this mechanism to redis.
My goal is to save the entire array (key => value) every 1000 iterations.
Old solution:
<?php
$data = array(
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3'
);
$memcached->setMulti($data, time()+864000);
New solution:
<?php
$data = array(
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3'
);
$redis->mSet($data);
The operation of these scripts is almost identical.
As you can see, the redis can not set the expire date when I'm using multi (mSet function).
Any solution?