We're using convention based mapping with Fluent NHibernate. The mapping looks like so:
.Conventions.Add
(
Table.Is(x => string.Concat(x.EntityType.Name.ToLower(), "s")),
PrimaryKey.Name.Is(x => "Id"),
DefaultLazy.Always(),
DefaultCascade.SaveUpdate(),
AutoImport.Never(),
Cache.Is(x => x.ReadWrite())
)
For most of our objects this is perfect but on certain objects I wish to disable the 2nd level cache. However it doesn't appear that I can do this. There is no fluent option for Cache.None. I've even tried Not.Cache() but that didn't work either.
Has anyone got any ideas on how I can disable the cache for certain selected model objects?