5
我不理解如何在Redis中创建持久存储。使用选项散列是我看到在路径中传递的唯一位置,它似乎没有任何影响。如何命名和存储我的数据集在redis中?
> r = Redis.new({:options => {:path => '~/redis_store'}})
=> #<Redis client v2.2.0 connected to redis://127.0.0.1:6379/0 (Redis v2.9.0)>
> r['foo']
=> "bar"
> s = Redis.new({:options => {:path => '~/redis_store2'}})
=> #<Redis client v2.2.0 connected to redis://127.0.0.1:6379/0 (Redis v2.9.0)>
> s['foo']
=> "bar"