Returns | 1 if the key is found, 0 if not |
---|---|
Keys |
|
Args |
|
> sadd users alice bob (integer) 2 > sadd admin jenny (integer) 1 > evalsha d7550c872f553141096d5134c027af5eeed283db 2 users admin alice (integer) 1 > evalsha d7550c872f553141096d5134c027af5eeed283db 3 users admin guests jenny (integer) 1 > evalsha d7550c872f553141096d5134c027af5eeed283db 2 users admin abner (integer) 0
-- Is an item in any of several sets? Call with: -- EVALSHAn set1 set2 ... setn key for i=1,#KEYS do if redis.call('sismember', KEYS[i], ARGV[1]) == 1 then return 1 end end return 0
d7550c872f553141096d5134c027af5eeed283db
← More scripts from the Memetria Library
All scripts on this site are in the public domain, unless otherwise noted, and are provided without warranty express or implied. Memetria make no claim for the effectiveness, safety, security or quality of the scripts contained within.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.