summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/script-exists.md
blob: 758660cf9b82269e2b730f0f108cc81479e9c33c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Returns information about the existence of the scripts in the script cache.

This command accepts one or more SHA1 digests and returns a list of ones or
zeros to signal if the scripts are already defined or not inside the script
cache.
This can be useful before a pipelining operation to ensure that scripts are
loaded (and if not, to load them using `SCRIPT LOAD`) so that the pipelining
operation can be performed solely using `EVALSHA` instead of `EVAL` to save
bandwidth.

For more information about `EVAL` scripts please refer to [Introduction to Eval Scripts](/topics/eval-intro).

@return

@array-reply The command returns an array of integers that correspond to
the specified SHA1 digest arguments.
For every corresponding SHA1 digest of a script that actually exists in the
script cache, a 1 is returned, otherwise 0 is returned.