Is there MGET analog for Redis hashes? -
i'm planning start using hashes insead of regular keys. can't find information multi hash-keys in redis wiki. kind of command supported redis?
thank you.
you can query hashes or keys in pipeline, i.e. in 1 request redis instance. actual implementation depends on client, redis-py it'd this:
pipe = conn.pipeline() pipe.hgetall('foo') pipe.hgetall('bar') pipe.hgetall('zar') hash1, hash2, hash3 = pipe.execute()
client issue 1 request 3 commands. same technique used add multiple values set @ once.
read more @ http://redis.io/topics/pipelining
Comments
Post a Comment