1

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?

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
jgauffin
  • 99,844
  • 45
  • 235
  • 372

2 Answers2

1

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.

Diego Mijelshon
  • 52,548
  • 16
  • 116
  • 154
1

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.

captaintom
  • 951
  • 7
  • 10