{
  "schema_version": 2,
  "id": "commands/object-idletime",
  "title": "OBJECT IDLETIME",
  "url": "https://redis.io/docs/latest/commands/object-idletime/",
  "summary": "Returns the time since the last access to a Redis object.",
  "since": "2.2.3",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-15T06:26:34-07:00",
  "page_type": "content",
  "content_hash": "44fcfc4968c17fd3a2d86f5902c2b3a73b161b1fa305a6810208095a394a5b19",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command returns the time in seconds since the last access to the value stored at `key`.\n\nThe command is only available when the `maxmemory-policy` configuration directive is not set to one of the LFU policies."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key.\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\nOne of the following:\n[Integer reply](../../develop/reference/protocol-spec#integers): the idle time in seconds.\n[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist.\n\n**RESP3:**\n\nOne of the following:\n[Integer reply](../../develop/reference/protocol-spec#integers): the idle time in seconds.\n[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist."
    }
  ],
  "examples": []
}
