0

By default, hibernate caches all the data in memory, how can I turn off that feature so that I can run my application with very low memory.

By default, hibernate caches 1st level in Session object and 2nd level at SessionFactory level. I want to disable both caches.

Sn.
  • 87
  • 2
  • 7
  • 1
    possible duplicate of [hibernate disabling cache](http://stackoverflow.com/questions/6830618/hibernate-disabling-cache) – Jason C Mar 14 '14 at 06:03
  • (Related: http://stackoverflow.com/questions/3827704/how-to-disable-hibernate-caching and https://www.google.com/search?q=hibernate+disable+cache) – Jason C Mar 14 '14 at 06:04
  • By default, hibernate caches 1st level in Session object and 2nd level at SessionFactory level. I think that answered for 1st level, but I still need a way for 2nd level cache. – Sn. Mar 14 '14 at 06:09
  • According to the second link, the 2nd level cache is disabled by default (I can't personally verify that). However, the 2nd answer in the first link seems to provide a way to disable 2nd level cache. – Jason C Mar 14 '14 at 06:12

0 Answers0