0

php code:

<?php
 class test {
  function tester(){
    $redis = new Predis\Client(array(
      'scheme' => 'tcp',
      'host' => 'localhost',
      'port' => '6379',
      'password => 'test'
    ));
    for($i=0;$i<10;$i++){
      $redis->set($i,'a');
    }
  }
}

And db show this:

1) "0" a
2) "1" a
3) "2" a
4) "3" a
5) "4" a
6) "5" a
7) "6" a
8) "7" a
9) "8" a
10) "9" a

It is fine, but when i stop the server and start again the db its empty. what can i do to make than keys don't delete after stop the server?

Daniel García
  • 329
  • 1
  • 2
  • 10

0 Answers0