Example #1
0
        private SessionStateStoreData DoGet(HttpContext context, string id, bool exclusive, out bool locked, out TimeSpan lockAge, out object lockId, out SessionStateActions actionFlags)
        {
            locked      = false;
            lockId      = null;
            lockAge     = TimeSpan.Zero;
            actionFlags = SessionStateActions.None;

            string getJson = "";

            getJson = RedisHelper.Get <string>(id);

            RedisSessionState state = RedisSessionState.FromJson(getJson);

            if (state == null)
            {
                return(null);
            }

            RedisHelper.ExpireEntryIn(id, state._timeout);

            return(CreateLegitStoreData(context, state._sessionItems, state._staticObjects, state._timeout));
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RedisHelper.Set <string>("aa", DateTime.Now.ToString());
     var str = RedisHelper.Get <string>("aa");
 }