title: asp.net - deleting cache object at session end
body: <p>I have a wrapper class for Caching (CachingBL) where I store users that are currently signed in (some of their session info). </p>
  
  <p>In CachingBL wrapper there is actually a dictionary of users, and I am putting that dictionary in cache like this: <code>HttpContext.Current.Cache.Insert(...)</code>:</p>
  
  <p>At the session end I would need to access to the cache like this:</p>
  
  <pre><code>var cacheBL = (CacheBL)HttpContext.Current.Cache.Get("MyCache_CacheSlot");
  </code></pre>
  
  <p>But the problem is that <code>HttpContext.Current</code> is empty, so I cannot access the <code>Cache</code> object. The Cache itself is not empty (tested), but I can't figure out how to access it at <code>Session_End</code>.</p>