-->
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.  [ 4 posts ] 
Author Message
 Post subject: Disabling second-level cache
PostPosted: Mon Dec 08, 2003 1:08 am 
Newbie

Joined: Sat Sep 06, 2003 9:29 pm
Posts: 6
Location: Minneapolis, MN
A couple of questions:

1. Can the second-level cache (SessionFactory level) be totally disabled in Hibernate 2.1rc1?

2. Is the EHCacheProvider the factory-default caching provider coming from the 2.1rc1 distribution? Do you have a second-level caching implementation turned on by default when using a stock Hibernate system without configuring the cache.provider_class property?

The reason I ask this is I would like to measure the performance of Hibernate when not using any second-level caching at all and then reapply second-level caching and demonstrate a performance gain. This is for a presentation on Hibernate that I am preparing.

Thanks in advance for any help concerning my questions. I been very impressed with the entire Hibernate product, hence my efforts to build this presentation and get the word out about this framework.

Regards,

-- chris bartling --


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 1:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
No, this is no simple switch. It is possible, however, to do like i do in org.hibernate.test.TestCase and iterate over all mapped collections and classes, calling setXXXCacheConcurrencyStrategy(null), or whatever.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 1:25 am 
Newbie

Joined: Sat Sep 06, 2003 9:29 pm
Posts: 6
Location: Minneapolis, MN
Thanks for the prompt reply Gavin. I can then assume that the net.sf.ehcache.hibernate.Provider is the default cache provider and second-level caching is enabled by default. The documentation on second level caching could be a bit more clear about this:

http://www.hibernate.org/hib_docs/refer ... ormance-s3

Thanks again for the information.

Regards,

-- chris bartling --


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 1:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
second-level cache is NOT enabled by default. It requires <cache> mapping elements in the .hbm.xml or <class-cache>/<collection-cache> elements in the .cfg.xml.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.