문제

How works expiration of NHibernate's syscache?

If I set expiration to 10 minutes, and each minute I add an entity, when the first 10 minutes (after application start) end, are all 10 entities deleted, or only the first one?

Are all data removed from cache altogether, or is there a timestamp for each entity?

도움이 되었습니까?

해결책 2

다른 팁

I've just looked inside SysCache source code and this line clearly states that it's absolute expiration:

cache.Add(
    cacheKey,
    new DictionaryEntry(key, value),
    new CacheDependency(null, new[] {rootCacheKey}),
    DateTime.Now.Add(expiration),
    System.Web.Caching.Cache.NoSlidingExpiration,
    priority,
    null);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top