dice
dice copied to clipboard
Add support for EXAT in SET command
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
-
Implemented
EXATOption:- Updated the
SETcommand to handle theEXAToption. - Parsed the Unix time provided and set the key to expire at the specified time.
- Updated the
-
Unit Tests:
- Added unit tests for the
EXAToption to ensure correct behavior. - Verified that the key expires at the correct time when using
EXAT.
- Added unit tests for the
-
Integration Tests:
- Ported relevant integration tests from the Redis test suite in
aof_test.go
- Ported relevant integration tests from the Redis test suite in
-
Benchmarking:
- Used
benchmemto track memory allocations and optimize where necessary.
- Used