开发者

Why does Velocity lose session after only a few minutes?

开发者 https://www.devze.com 2022-12-13 03:13 出处:网络
I\'ve set up sesion management with Velocity distributed cache. I have 3 servers hosting the cache and created the named cache with

I've set up sesion management with Velocity distributed cache. I have 3 servers hosting the cache and created the named cache with

new-cache Sessions -Secondaries 1 TTL 1440

and the following is in my web.config file

<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>

Any help would开发者_运维知识库 be appreciated.


Looks like ites are getting evicted. By default caches are evictable, i.e, items stored in the cache can be evicted. You should create a non-evictable cache using the new-cache command. Example: New-Cache -Eviction None

Set other cache properties as is required.

0

精彩评论

暂无评论...
验证码 换一张
取 消