public void SaveUserDetails(CachedUser user) { sessionLock.EnterReadLock(); httpContext.Session[cachedUserId] = JsonConvert.SerializeObject(user); sessionLock.ExitReadLock(); }
public void SaveUserDetails(CachedUser user) { sessionLock.EnterWriteLock(); httpContext.Session[userCacheKey] = JsonConvert.SerializeObject(user); sessionLock.ExitWriteLock(); }