ServiceStack.ServiceStackHost.OnSaveSession C# (CSharp) Метод

OnSaveSession() публичный Метод

public OnSaveSession ( IRequest httpReq, IAuthSession session, System.TimeSpan expiresIn = null ) : void
httpReq IRequest
session IAuthSession
expiresIn System.TimeSpan
Результат void
        public virtual void OnSaveSession(IRequest httpReq, IAuthSession session, TimeSpan? expiresIn = null)
        {
            if (httpReq == null) return;

            var sessionKey = SessionFeature.GetSessionKey(session.Id ?? httpReq.GetOrCreateSessionId());
            session.LastModified = DateTime.UtcNow;
            this.GetCacheClient().CacheSet(sessionKey, session, expiresIn ?? GetDefaultSessionExpiry(httpReq));

            httpReq.Items[Keywords.Session] = session;
        }