Disable cache for one model
-
24-10-2019 - |
Question
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?
Solution
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.
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow