Disable cache for one model

830 Views Asked by At

I got a table which is modified by two applications. One of them is using nhibernate. How do I disable caching for that table? Can it be done in the mapping file?

2

There are 2 best solutions below

0
On BEST ANSWER

Cache is not enabled by default.

If you are referring to the "first level cache", i.e. the Session, there is something wrong with your usage pattern.

0
On

Assuming you have the L2 cache enabled for the session factory (via cache.use_second_level_cache), you should be able to exclude the <cache> element in your mapping file for that model.