public override void SetAndReleaseItemExclusive(HttpContext context, string id, SessionStateStoreData item, object lockId, bool newItem) { LogUtils.WriteInfo("------------------ SetAndReleaseItemExclusive 1 ------------------"); ISessionStateItemCollection sessionItems = null; HttpStaticObjectsCollection staticObjects = null; if (item.Items.Count > 0) { sessionItems = item.Items; } if (!item.StaticObjects.NeverAccessed) { staticObjects = item.StaticObjects; } LogUtils.WriteInfo(context); LogUtils.WriteInfo(id); LogUtils.WriteInfo(item); LogUtils.WriteInfo(lockId); LogUtils.WriteInfo(newItem); LogUtils.WriteInfo(staticObjects); LogUtils.WriteInfo(sessionItems); MqdSessionState state2 = new MqdSessionState(sessionItems, staticObjects, item.Timeout); LogUtils.WriteInfo(state2); RedisUtils.SetString(id, state2.ToJson(), item.Timeout); LogUtils.WriteInfo("------------------ SetAndReleaseItemExclusive 2 ------------------\r\n"); }
public override void CreateUninitializedItem(HttpContext context, string id, int timeout) { LogUtils.WriteInfo("------------------ CreateUninitializedItem 1 ------------------"); LogUtils.WriteInfo(context); LogUtils.WriteInfo(id); LogUtils.WriteInfo(timeout); MqdSessionState state = new MqdSessionState(null, null, timeout); LogUtils.WriteInfo(state); RedisUtils.SetString(id, state.ToJson(), timeout); LogUtils.WriteInfo("------------------ CreateUninitializedItem 2 ------------------\r\n"); }