{
  "schema_version": 2,
  "id": "commands/client-no-evict",
  "title": "CLIENT NO-EVICT",
  "url": "https://redis.io/docs/latest/commands/client-no-evict/",
  "summary": "Sets the client eviction mode of the connection.",
  "since": "7.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:21+01:00",
  "page_type": "content",
  "content_hash": "5267755d93a74b0c4fb51f33f626bc4ed95b72e0d1ab5b63dd7273bb167d25dd",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The `CLIENT NO-EVICT` command sets the [client eviction](https://redis.io/docs/latest/develop/reference/clients#client-eviction) mode for the current connection.\n\nWhen turned on and client eviction is configured, the current connection will be excluded from the client eviction process even if we're above the configured client eviction threshold.\n\nWhen turned off, the current client will be re-included in the pool of potential clients to be evicted (and evicted if needed).\n\nSee [client eviction](https://redis.io/docs/latest/develop/reference/clients#client-eviction) for more details."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>ON | OFF</code></summary>\n\nTurn eviction protection on (`ON`) or off (`OFF`) for the current connection.\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=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n\n* [Simple string reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings): `OK` if the command was successful.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in these cases: wrong number of or invalid arguments.\n\n**RESP3:**\n\nOne of the following:\n\n* [Simple string reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings): `OK` if the command was successful.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in these cases: wrong number of or invalid arguments."
    }
  ],
  "examples": []
}
