dice icon indicating copy to clipboard operation
dice copied to clipboard

Add support for EXAT in SET command

Open colommar opened this issue 1 year ago • 3 comments

Add EXAT Support to SET Command

Description

This pull request adds support for the EXAT option to the SET command, similar to the EXAT option in Redis. The EXAT option sets the specified Unix time at which the key will expire, in seconds. Solving the issue #202

Changes Made

  1. Implemented EXAT Option:

    • Updated the SET command to handle the EXAT option.
    • Parsed the Unix time provided and set the key to expire at the specified time.
  2. Unit Tests:

    • Added unit tests for the EXAT option to ensure correct behavior.
    • Verified that the key expires at the correct time when using EXAT.
  3. Integration Tests:

    • Ported relevant integration tests from the Redis test suite in aof_test.go
  4. Benchmarking:

    • Used benchmem to track memory allocations and optimize where necessary.

colommar avatar Aug 03 '24 11:08 colommar