Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object caching

 
shiva shankar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to cache objects as a result of a join query through Hibernate. I don't want a custom cache.

I am using Spring with Hibernate

Thanks
shiva
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Objects are cached implicitly in the first level cache (the Session) when they are returned by whatever method you use to get them. You could also use the second level cache if you require more cache control. To do this you must add cache statements into the mapping files from those objects you wish to participcate in the cache and use some third party cache implementation like JBossCache.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic