Fix `set` to prevent chaing `created` field
Use INSERT ... ON CONFLICT ... DO UPDATE instead of INSERT OR REPLACE to ensure that only the value and expires_at fields are updated when modifying an existing key. This maintains the original created timestamp while still allowing TTL updates. Added test case to verify that created timestamp remains unchanged during updates while expires_at is properly modified.
Loading
Please register or sign in to comment