} {
$r zadd $k $d $v
} {
- puts "hset $k $f $v"
$r hset $k $f $v
}
set t [$r type $k]
}
{hash} {
randpath {$r hset $k $f $v} \
- {puts "$r hdel $k $f"; $r hdel $k $f}
+ {$r hdel $k $f}
}
}
}
} else {
set aux [::sha1::sha1 -hex [$r zrange $k 0 -1]]
}
+ } {hash} {
+ if {[$r hlen $k] == 0} {
+ set aux {}
+ } else {
+ set aux [::sha1::sha1 -hex [lsort [$r hgetall $k]]]
+ }
} default {
error "Type not supported: $t"
}