2009-12-01 70 views
0

我已经建立了Velocity分布式缓存的sesion管理。我有3个服务器托管缓存并创建了为什么Velocity在几分钟后失去会话?

new-cache Sessions -Secondaries 1 TTL 1440 

命名缓存,以下是我的web.config文件

<section name="dataCacheClient" 
type="Microsoft.Data.Caching.DataCacheClientSection,&#xD;&#xA; cacheBaseLibrary" 
allowLocation="true" 
allowDefinition="Everywhere"/> 

    <sessionState mode="Custom" customProvider="Velocity" > 
     <providers> 
      <add 
       name="Velocity" 
         type="Microsoft.Data.Caching.DataCacheSessionStoreProvider" 
       cacheName="Sessions"/> 
     </providers> 
    </sessionState> 

任何帮助,将不胜感激。

回答

1

看起来像是被驱逐出境。默认情况下,缓存是可驱逐的,即存储在缓存中的项目可以被驱逐。您应该使用new-cache命令创建一个不可驱逐的缓存。 示例: 新缓存 - 无限无

根据需要设置其他缓存属性。

相关问题