{
  "schema_version": 2,
  "id": "commands/script-exists",
  "title": "SCRIPT EXISTS",
  "url": "https://redis.io/docs/latest/commands/script-exists/",
  "summary": "Determines whether server-side Lua scripts exist in the script cache.",
  "since": "2.6.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:32+01:00",
  "page_type": "content",
  "content_hash": "7b9d0c1e95a98b5e97baa9e21b3820bbc4f5b62af09652d4288536c535b55bd7",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns information about the existence of the scripts in the script cache.\n\nThis command accepts one or more SHA1 digests and returns a list of 1 and 0 values to indicate whether each script exists in the script cache. Before you run a pipeline, use this command to check whether Redis has loaded the scripts you need. For missing scripts, use [`SCRIPT LOAD`](https://redis.io/docs/latest/commands/script-load); then use [`EVALSHA`](https://redis.io/docs/latest/commands/evalsha) instead of [`EVAL`](https://redis.io/docs/latest/commands/eval) in the pipeline to save bandwidth.\n\nFor more information about [`EVAL`](https://redis.io/docs/latest/commands/eval) scripts see [Introduction to Eval Scripts](https://redis.io/docs/latest/develop/programmability/eval-intro)."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>sha1 [sha1 ...]</code></summary>\n\nOne or more SHA1 digests to look up in the script cache.\n\n</details>"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): an array of integers that correspond to the specified SHA1 digest arguments.\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): an array of integers that correspond to the specified SHA1 digest arguments."
    }
  ],
  "examples": []
}
