V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
leonardleonard
V2EX  ›  程序员

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

  •  
  •   leonardleonard · Apr 9, 2014 · 4231 views
    This topic created in 4404 days ago, the information mentioned may be changed or developed.
    public static int IncreaseAppleCountOfRoom(string roomId)
    {
    using (var redis = Server.GetVectorRedisReadWriteClient())
    {
    return (int)redis.IncrementValueInHash("item:apple:count", roomId.ToString(), 0);
    }
    }

    这个方法是用来获取 一个房间的苹果数。
    平时运行的很好,但有的时候会出现获取的数字是个脏数据,就是奇怪的数字,这点我很奇怪。有没有达人遇到过这样的问题。
    1 replies    1970-01-01 08:00:00 +08:00
    lang1pal
        1
    lang1pal  
       Apr 10, 2014
    static的y原因?,不是很懂,坐等高手
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2388 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:48 · PVG 09:48 · LAX 18:48 · JFK 21:48
    ♥ Do have faith in what you're doing.