Hibernate Second level Cache <>

后端 未结 2 1312
迷失自我
迷失自我 2021-02-04 21:10

I want use second level cache in my hibernate Project but I just know a little about hibernate second level cache, can any one explain how shoud I use this in my code and what c

2条回答
  •  野性不改
    2021-02-04 21:52

    Your settings will make the second-level and query caches available for use in your project, but you still need to enable it for specific entities, collections, and queries. This requires some careful planning because there are trade-offs that you'll need to understand. In general, the second-level and query caches are appropriate for read-only or read-mostly data, but not volatile data. If you don't already own it, I would recommend picking up a copy of Java Persistence with Hibernate. It has a very good treatment of the subject.

提交回复
热议问题