content/commands/script-exists.md
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]({{< relref "/commands/script-load" >}})) so that the pipelining
operation can be performed solely using [EVALSHA]({{< relref "/commands/evalsha" >}}) instead of [EVAL]({{< relref "/commands/eval" >}}) to save
bandwidth.
For more information about [EVAL]({{< relref "/commands/eval" >}}) scripts please refer to [Introduction to Eval Scripts]({{< relref "/develop/programmability/eval-intro" >}}).
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |
{{< multitabs id="script-exists-return-info" tab1="RESP2" tab2="RESP3" >}}
Array reply: an array of integers that correspond to the specified SHA1 digest arguments.
-tab-sep-
Array reply: an array of integers that correspond to the specified SHA1 digest arguments.
{{< /multitabs >}}