These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: detault 2nd level cache?
PostPosted: Wed Mar 22, 2006 2:05 pm 
Regular
Regular

Joined: Thu May 26, 2005 12:20 am
Posts: 72
It is possible to tell hibernate to use second level cache for all objects and all collections, without explicitly defining them all in config files?

For instance, I'd like to default cache everything with a 'read-write' strategy unless I explicitly call for something else.

My list of caching defs is getting long, and it's annoying to have to add to each time I create a new object or collection within an object just to get basic caching goodness.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 8:21 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Yes indeed. From section 19.2.1 of the ref docs: "Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in hibernate.cfg.xml." These settings are overridden by whatever you put in the <cache> element of a class or collection mapping.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.