Skip to content

Commit

Permalink
return key without expiry check as store.Get handles it
Browse files Browse the repository at this point in the history
  • Loading branch information
xanish committed Nov 17, 2024
1 parent a116e8b commit b913cfa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/eval/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -1387,11 +1387,7 @@ func evalRANDOMKEY(args []string, store *dstore.Store) *EvalResponse {
continue
}

currTimeMs := uint64(utils.GetCurrentTime().UnixMilli())
expireTimeMs, isExpirySet := dstore.GetExpiry(keyObj, store)
if (isExpirySet && expireTimeMs > currTimeMs) || !isExpirySet {
return makeEvalResult(clientio.Encode(randKey, false))
}
return makeEvalResult(clientio.Encode(randKey, false))
}
}

Expand Down

0 comments on commit b913cfa

Please sign in to comment.