how to limit number of entries in a db of redis
I am running a redis instance and want to limit the number of keys in an DB of the instance. I checke the documentation and I 开发者_StackOverflow社区saw that we can limit the memory of a complete instance .Any way to do that on DB level?
Thanks in Advance.
No, Redis does not have a function that can limit the amount of keys in the database.
The closest thing I can think of is checking the key number in your script, and the preventing the query of there is too many keys in the databse
精彩评论