Example #1
0
 public override void ResetItemTimeout(HttpContext context, string id)
 {
     try
     {
         if (LastException == null)
         {
             LogUtility.LogInfo("ResetItemTimeout => Session Id: {0}, Session provider object: {1}.", id, this.GetHashCode());
             GetAccessToStore(id);
             cache.UpdateExpiryTime((int)configuration.SessionTimeout.TotalSeconds);
             cache = null;
         }
     }
     catch (Exception e)
     {
         LogUtility.LogError("ResetItemTimeout => {0}", e.ToString());
         LastException = e;
         if (configuration.ThrowOnError)
         {
             throw;
         }
     }
 }
Example #2
0
 public override async Task ResetItemTimeoutAsync(HttpContextBase context, string id, CancellationToken cancellationToken)
 {
     try
     {
         if (LastException == null)
         {
             LogUtility.LogInfo("ResetItemTimeout => Session Id: {0}, Session provider object: {1}.", id, this.GetHashCode());
             GetAccessToStore(id);
             cache.UpdateExpiryTime((int)configuration.SessionTimeout.TotalSeconds);
             cache = null;
         }
     }
     catch (Exception e)
     {
         LogUtility.LogError("ResetItemTimeout => {0}", e.ToString());
         LastException = e;
         if (configuration.ThrowOnError)
         {
             throw;
         }
     }
     await Task.FromResult(0);
 }