title: Using SqlCacheDependency to get real time updates? - ASP.NET
body: <p>I would like to display real time updates on a web page (based on a status field in a database table that is altered by an external process). Based on my research, there are several ways of doing this.</p>
  
  <ul>
  <li>Long Polling (Comet) - This seems to be complex to implement</li>
  <li>Regular Polling - I can have an AJAX method trigger a database hit every 5seconds to get the current status. But I fear this will have performance issues.</li>
  </ul>
  
  <p>Then I read about using <code>SqlCacheDependency</code> - basically the cache gets invalidated based on a field in the table. I am assuming I can use the event trigerred when the cache is invalidated to show the new update to the user?</p>
  
  <p>What's an easy solution that will not have performance issues?</p>