V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
leonardleonard
V2EX  ›  程序员

C# 中读取 Redis 数据出现脏数据

  •  
  •   leonardleonard · 2014-04-09 19:50:14 +08:00 · 3478 次点击
    这是一个创建于 3674 天前的主题,其中的信息可能已经有所发展或是发生改变。
    public static int IncreaseAppleCountOfRoom(string roomId)
    {
    using (var redis = Server.GetVectorRedisReadWriteClient())
    {
    return (int)redis.IncrementValueInHash("item:apple:count", roomId.ToString(), 0);
    }
    }

    这个方法是用来获取 一个房间的苹果数。
    平时运行的很好,但有的时候会出现获取的数字是个脏数据,就是奇怪的数字,这点我很奇怪。有没有达人遇到过这样的问题。
    1 条回复    1970-01-01 08:00:00 +08:00
    lang1pal
        1
    lang1pal  
       2014-04-10 10:22:58 +08:00
    static的y原因?,不是很懂,坐等高手
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2234 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 11:13 · PVG 19:13 · LAX 04:13 · JFK 07:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.