回覆列表
  • 1 # 使用者5299230923514

    下面是Nop裡面的程式碼你可以參考下

    ///

    /// Removes items by pattern

    ///

    /// pattern

    public virtual void RemoveByPattern(string pattern)

    {

    var _muxer = RedisManager.GetMuxer();

    var _db = RedisManager.GetDb();

    foreach (var ep in _muxer.GetEndPoints())

    {

    var server = _muxer.GetServer(ep);

    var keys = server.Keys(pattern: "*" + pattern + "*", database: _db.Database);

    foreach (var key in keys)

    _db.KeyDelete(key);

    }

    }

  • 中秋節和大豐收的關聯?
  • 轉呼啦圈的作用?