{
  "schema_version": 2,
  "id": "commands/bless-get",
  "title": "BLESS GET",
  "url": "https://redis.io/docs/latest/commands/bless-get/",
  "summary": "Returns the active protection flags of a key.",
  "since": "8.12.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-23T06:19:08-08:00",
  "page_type": "content",
  "content_hash": "dacbeee2a3d94b1ad5ec3d460735b2cdb833b446d54ba646f7d29b0a03aab262",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "`BLESS GET` returns the eviction-protection flags currently set on a key. The key must already exist."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key to inspect. The key must already exist, or the command returns an error.\n\n</details>"
    },
    {
      "id": "details",
      "title": "Details",
      "role": "content",
      "text": "`BLESS GET` returns an empty array if the key exists but has no protection flags. `NO-EVICT` is currently the only flag `BLESS` defines."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> SET session:42 \"some value\"\nOK\nredis> BLESS GET session:42\n(empty array)\nredis> BLESS SET session:42 NO-EVICT\n(integer) 1\nredis> BLESS GET session:42\n1) \"NO-EVICT\"\nredis> BLESS GET missing-key\n(error) ERR no such key"
    },
    {
      "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* [Array reply](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays) of the key's active protection flags, empty if none are set.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) if the key doesn't exist.\n\n**RESP3:**\n\nOne of the following:\n* [Array reply](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays) of the key's active protection flags, empty if none are set.\n* [Simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) if the key doesn't exist."
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`BLESS SET`](https://redis.io/docs/latest/commands/bless-set) | [`BLESS CLEAR`](https://redis.io/docs/latest/commands/bless-clear) | [`BLESS SCAN`](https://redis.io/docs/latest/commands/bless-scan)"
    },
    {
      "id": "related-topics",
      "title": "Related topics",
      "role": "related",
      "text": "- [Key eviction](https://redis.io/docs/latest/develop/reference/eviction)"
    }
  ],
  "examples": []
}
