-->
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.  [ 1 post ] 
Author Message
 Post subject: Why does Hibernate Create so many Caches?
PostPosted: Tue Jun 22, 2004 8:16 pm 
Regular
Regular

Joined: Tue Jun 22, 2004 8:01 pm
Posts: 106
Location: PowderTown, Utah, USA
I'm using Hibernate 2.1.4 and OSCache. On startup I've noticed that Hibernate creates several caches (seven of them, in fact). Is this normal? If so, why does it need so many caches? Is it actually creating that many caches? Does it create one cache per persistent file? It seems like that's what's going on. If so, isn't that wasteful? Is the OSCache implementation designed to create one cache per persistent class?

Thanks!

Here's my output (log level for OSCache set to INFO, bold added):

2004-06-22 17:40:27,140 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,218 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,218 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,218 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache
2004-06-22 17:40:27,281 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache
2004-06-22 17:40:27,281 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache
2004-06-22 17:40:27,281 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache
2004-06-22 17:40:27,281 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache
2004-06-22 17:40:27,281 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,281 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache
2004-06-22 17:40:27,312 [com.opensymphony.oscache.base.Config] INFO - Properties {cache.path=c:\Tomcat 5.0\work\oscache, cache.capacity=1000}
2004-06-22 17:40:27,312 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Constructed GeneralCacheAdministrator()
2004-06-22 17:40:27,312 [com.opensymphony.oscache.general.GeneralCacheAdministrator] INFO - Creating new cache


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

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.