Method: Xunch::RedisClient#hset
- Defined in:
- lib/xunch/shard/redis.rb
#hset(key, hash, ttl) ⇒ Object
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/xunch/shard/redis.rb', line 120 def hset(key, hash, ttl) with do | redis | redis.pipelined do redis.mapped_hmset(key, hash) if(ttl > 0) redis.expire(key,ttl) end end end end |