title: How to config Redis cache expiration with RedisSessionStateProvider?
body: <p>I create a MVC sample app uses <a href="http://blogs.msdn.com/b/webdev/archive/2014/05/12/announcing-asp-net-session-state-provider-for-redis-preview-release.aspx" rel="nofollow">RedisSessionStateProvider</a> as a custom session state. I set a variable into session state and it works great. But I do not know how to synchronize expiration of items in the session and Redis. Could anyone please help?</p>
  
  <p>This is parameters from web.config</p>
  
  <pre><code>        &lt;!--
        &lt;add name="MySessionStateStore" 
          host = "127.0.0.1" [String]
          port = "" [number]
          accessKey = "" [String]
          ssl = "false" [true|false]
          throwOnError = "true" [true|false]
          retryTimeoutInMilliseconds = "5000" [number]
          databaseId = "0" [number]
          applicationName = "MvcTestApp" [String]
          connectionTimeoutInMilliseconds = "5000" [number]
          operationTimeoutInMilliseconds = "1000" [number]
          connectionString = "&lt;Valid StackExchange.Redis connection string&gt;" [String]
          loggingClassName = "&lt;Assembly qualified class name that contains logging method specified below&gt;" [String]
          loggingMethodName = "&lt;Logging method should be defined in loggingClass. It should be public, static, does not take any parameters and should have a return type of System.IO.TextWriter.&gt;" [String]
        /&gt;
      --&gt;
  </code></pre>
  
  <p>I am using lateset versions:
  RedisSessionStateProvider version 1.6.4
  Redis version 2.8.21</p>