时尚

腾讯面试之言浅意深 Redis

时间:2010-12-5 17:23:32  作者:IT科技   来源:域名  查看:  评论:0
内容摘要:复制if(redis.call(exists,KEYS[1])==0)then redis.call(hset,KEYS[1],ARGV[2],1); re

腾讯面试之言浅意深 Redis
复制if (redis.call(exists,腾讯 KEYS[1]) == 0) then   redis.call(hset, KEYS[1], ARGV[2], 1);     redis.call(pexpire, KEYS[1], ARGV[1]);     return nil;   end;  if (redis.call(hexists, KEYS[1], ARGV[2]) == 1) then   redis.call(hincrby, KEYS[1], ARGV[2], 1);    redis.call(pexpire, KEYS[1], ARGV[1]);    return nil;  end;  return redis.call(pttl, KEYS[1]);  1.2.3.4.5.6.7.8.9.10.11.12.13.
copyright © 2025 powered by 编程之道  滇ICP备2023006006号-34sitemap