• 请不要在回答技术问题时复制粘贴 AI 生成的内容
leonardleonard
V2EX  ›  程序员

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

  •  
  •   leonardleonard · Apr 9, 2014 · 4323 views
    This topic created in 4454 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   ·   2560 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 07:57 · PVG 15:57 · LAX 00:57 · JFK 03:57
    ♥ Do have faith in what you're doing.