9951 explained code solutions for 126 technologies


python-redisGet Redis key size


r = redis.Redis()
size = r.debug_object('test')['serializedlength']ctrl + c
redis.Redis

connect to Redis server

debug_object

return Redis system info on specified key

test

key to get size of

serializedlength

will return size of the value of specified key