Announcement Announcement Module
Collapse
No announcement yet.
How can one enable caching on entities when using Spring Data JPA? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can one enable caching on entities when using Spring Data JPA?

    We are using Spring Data JPA on our project (quite successfully). We want to enable caching for certain entities. In some cases the entity instances will be cached eternally (in terms of JVM process lifetime) while in other cases the caching will be time-bound.

    Are there any examples and documentation on enabling distributed caching when using Spring Data JPA? I know how to do this with plain-vanilla Hibernate and different types of caches such as EHCACHE, Tangosol, etc. but could not find any documentation on doing this with Spring Data JPA.

  • #2
    Just use the Cache-Annotations of Spring or JPA 2.0.
    Spring JPA Data has no special cache handling.

    Comment

    Working...
    X