Skip to content

Feature: Add Hash Field Expiration Commands #2992

@ofekshenawa

Description

@ofekshenawa

Description

Introduce new commands that enable setting expiration times for individual fields within a hash. These commands will mirror existing Redis commands for setting key expiration but will be adapted for hash fields.

Proposed Commands

  1. HEXPIRE: Set TTL in seconds for specified fields within a hash.
  2. HPEXPIRE: Set TTL in milliseconds for specified fields within a hash.
  3. HEXPIREAT: Set expiration time as a UNIX timestamp in seconds for specified fields.
  4. HPEXPIREAT: Set expiration time as a UNIX timestamp in milliseconds for specified fields.
  5. HPERSIST: Remove expiration time from specified fields.
  6. HEXPIRETIME: Retrieve the expiration time in seconds for specified fields.
  7. HPEXPIRETIME: Retrieve the expiration time in milliseconds for specified fields.
  8. HTTL: Retrieve the TTL in seconds for specified fields.
  9. HPTTL: Retrieve the TTL in milliseconds for specified fields.

Request for Comments

Feedback on the implementations is highly welcome. Please share any concerns or additional features that should be considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions