public override void ResetItemTimeout (HttpContext context, string id)
{
EnsureGoodId (id, true);
string CacheId = CachePrefix + id;
Cache cache = HttpRuntime.InternalCache;
InProcSessionItem item = cache [CacheId] as InProcSessionItem;
if (item == null)
return;
bool locked = false;
try {
if (item.rwlock.TryEnterWriteLock (lockAcquireTimeout))
locked = true;
else
throw new ApplicationException ("Failed to acquire lock after");
item.resettingTimeout = true;
cache.Remove (CacheId);
InsertSessionItem (item, item.timeout, CacheId);
} catch {
throw;
} finally {
if (locked)
item.rwlock.ExitWriteLock ();
}
}