+ len = r.scard(k)
+ if len != 0
+ sha1 = Digest::SHA1.hexdigest(sha1+k)
+ sha1 = Digest::SHA1.hexdigest(sha1+r.set_members(k).to_a.sort.join("\x02"))
+ end
+ elsif vtype == "zset"
+ len = r.zcard(k)
+ if len != 0
+ sha1 = Digest::SHA1.hexdigest(sha1+k)
+ sha1 = Digest::SHA1.hexdigest(sha1+r.zrange(k,0,-1).join("\x01"))
+ end