Expiration of NHibernate syscache



nhibernate的syscache的工作原理?

如果我将到期设置为10分钟,并且每分钟我添加一个实体(申请开始之后),则所有10个实体都删除了,或者仅删除了第一个实体?

所有数据都完全从缓存中删除,还是每个实体都有时间戳?

我刚刚在syscache源代码中查看,这一行明确指出它是绝对的到期:

cache.Add(
    cacheKey,
    new DictionaryEntry(key, value),
    new CacheDependency(null, new[] {rootCacheKey}),
    DateTime.Now.Add(expiration),
    System.Web.Caching.Cache.NoSlidingExpiration,
    priority,
    null);

滑动到期,如Rippo所指出的。

http://docs.huihoo.com/hibernate/nhibernate-referent-1.2.0/caches.html

最新更新