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
|