Results 1 to 2 of 2

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

  1. #1
    Join Date
    Mar 2012
    Location
    Gurgaon, India
    Posts
    49

    Default 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. #2
    Join Date
    Mar 2007
    Posts
    561

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •