Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 74846ad531
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (43 sloc) 2.095 kB
<link type="text/css" rel="stylesheet" href="style.css" />
<div id="page">
<div id='header'>
<a href="index.html">
<img style="border:none" alt="Redis Documentation" src="redis.png">
<div id="pagecontent">
<div class="index">
<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
<b>MgetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Example">Example</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
<h1 class="wikiname">MgetCommand</h1>
<div class="summary">
<div class="narrow">
<h1><a name="MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a></h1>
<i>Time complexity: O(1) for every key</i><blockquote>Get the values of all the specified keys. If one or more keys dont existor is not of type String, a 'nil' value is returned instead of the valueof the specified key, but the operation never fails.</blockquote>
<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a><h2><a name="Example">Example</a></h2><pre class="codeblock python" name="code">
$ ./redis-cli set foo 1000
$ ./redis-cli set bar 2000
$ ./redis-cli mget foo bar
1. 1000
2. 2000
$ ./redis-cli mget foo bar nokey
1. 1000
2. 2000
3. (nil)
</pre><h2><a name="See also">See also</a></h2>
<ul><li> <a href="GetCommand.html">GET</a></li><li> <a href="SetCommand.html">SET</a></li><li> <a href="SetnxCommand.html">SETNX</a></li><li> <a href="IncrCommand.html">INCR</a></li></ul>
Jump to Line
Something went wrong with that request. Please try again.