【发布时间】:2011-09-09 18:19:20
【问题描述】:
我有两个对象 - ContentPage,它有一个 ChildLinks 的集合。
ContentPage
-----------
ID
Title
ChildLink
----------
ID
ParentPageID [ContentPage]
ChildPageID [ContentPage]
Priority
ContentPage.ChildLinks 属性使用二级缓存。我正在使用 Fluent NH 来配置 Nhibernate,并使用 Nhibernate 3.1。集合和“ChildLink”类的缓存都设置为“读写”。
我注意到,每当我删除 ChildLink 时,集合缓存都不会失效。因此,当我调用ContentPage.ChildLinks 时,我得到一个错误:
no row with the given identifier exists
我已经关闭了缓存,它运行良好。缓存不应该自动失效吗?我使用 SysCache 作为缓存提供程序,使用 MySQL 作为数据库。
提前致谢!
【问题讨论】:
-
你能找到更多关于这个 Karl 的信息吗?用我自己的二级缓存查看 FNH(到 AppFabric)。
标签: nhibernate caching collections invalidation