what's the point of context in redis client? #3084
-
Hello,
what's the point of it ?, why we don't just pass the key and value ? |
Beta Was this translation helpful? Give feedback.
Answered by
RPGillespie6
Aug 9, 2024
Replies: 1 comment
-
For example, you might be connecting to redis in an HTTP handler, and if the HTTP client terminates the connection, there's no point in continuing on with some redis operation. The context lets redis client know that the operation has been cancelled. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zYasser
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, you might be connecting to redis in an HTTP handler, and if the HTTP client terminates the connection, there's no point in continuing on with some redis operation. The context lets redis client know that the operation has been cancelled.