Astro
2018-11-14 07:03:09 UTC
Currently, is there a way in redis to set max possible value of a key?
For example,
set maxvalue key1 100 -- sets the max possible value of key1 to 100
set key1 10 -> success
incr key1 -> success
set key1 99 -> success
incr key1 -> success
incr key1 -> fail (max value of key1 100 is reached)
This can be helpful in cases where concurrent clients are trying to access
same key in redis.
Any help will be appreciated.
Thanks!
For example,
set maxvalue key1 100 -- sets the max possible value of key1 to 100
set key1 10 -> success
incr key1 -> success
set key1 99 -> success
incr key1 -> success
incr key1 -> fail (max value of key1 100 is reached)
This can be helpful in cases where concurrent clients are trying to access
same key in redis.
Any help will be appreciated.
Thanks!
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.