title: Is it OK to use NaiveSessionCache from Azure-Samples Azure Active Directory OpenId Connect
body: <p>We are writing a web application similar to 
  <a href="https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect" rel="nofollow noreferrer">Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect</a></p>
  
  <p>The sample includes  <a href="https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect/blob/master/TodoListWebApp/Utils/NaiveSessionCache.cs" rel="nofollow noreferrer">NaiveSessionCache.cs</a>,  which stores the access token in  the ASP.NET Session state for UserObjectId.
  The code looks reasonable, but I have concerns with regards to the name "Naive".</p>
  
  <p>Are there any reasons why I should not use it in production?</p>
  
  <p>Vittorio Bertocci's article <a href="http://www.cloudidentity.com/blog/2014/07/09/the-new-token-cache-in-adal-v2/" rel="nofollow noreferrer">The New Token Cache in ADAL v2</a>,   describes
  FileCache (for a desktop application)
  and database EFADALTokenCache alternatives for implementing <a href="https://msdn.microsoft.com/en-us/library/microsoft.identitymodel.clients.activedirectory.tokencache.aspx" rel="nofollow noreferrer">TokenCache</a>. 
  However I feel that using SQL DB is too heavy if I can use session instead.</p>
  
  <p>Could anyone give any cons to use session?</p>