我创建了一个MVC示例应用程序,使用RedisSessionStateProvider作为自定义会话状态。我将一个变量设置到会话状态中,并且它能够正常工作。但是我不知道如何同步会话中和Redis中的项目过期。有人能帮忙吗?
这是来自web.config的参数。
这是来自web.config的参数。
<!--
<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 = "<Valid StackExchange.Redis connection string>" [String]
loggingClassName = "<Assembly qualified class name that contains logging method specified below>" [String]
loggingMethodName = "<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.>" [String]
/>
-->
我正在使用最新版本: RedisSessionStateProvider 版本 1.6.4 Redis 版本 2.8.21