Conversation
✅ Deploy Preview for redis-doc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| The script **should only** access keys whose names are given as input arguments. | ||
| Scripts **should never** access keys with programmatically-generated names or based on the contents of data structures stored in the database. | ||
| If a key with expiry (TTL) exists at the start of eval, it will not get expired during the evaluation of a script. | ||
| During the evaluation of a Lua script, TTL of a key can go down to zero. After that, it remains zero until the script terminates. |
There was a problem hiding this comment.
Are you sure? Can you give an example?
I thought that we freeze time during evaluation, so TTL will return the same value every time throughout the evaluation.
There was a problem hiding this comment.
There was a problem hiding this comment.
yean, we will freeze the time during the evaluation, the [P]TTL should return the same value in this case in Redis 7.2
zuiderkwast
left a comment
There was a problem hiding this comment.
The points listed in #886 are not valid anymore. This PR needs to explain the behaviour after redis/redis#10300 was merged, i.e. the time is frozen during script execution.
|
|
adds a couple of tips to EVAL doc about TTL and fixes a typo #886