Caching in practice a region named db1.auction.model.Category. This
Tuesday, February 26th, 2008Caching in practice a region named db1.auction.model.Category. This setting is necessary if your application works with multiple SessionFactory instances or persistence units. Without it, cache region names of different persistence units may conflict. Now that you know about cache regions, you can configure the physical properties of the auction.model.Category cache. First let s choose a cache provider. Suppose you re running your auction application in a single JVM, so you don t need a cluster-aware provider. 13.4.3 Setting up a local cache provider You need to set the configuration property that selects a cache provider: hibernate.cache.provider_class = org.hibernate.cache.EhCacheProvider You choose EHCache as your second-level cache in this case. Now, you need to specify the properties of the cache regions. EHCache has its own configuration file, ehcache.xml, in the classpath of the application. The Hibernate distribution comes bundled with example configuration files for all bundled cache providers, so we recommend that you read the usage comments in those files for detailed configuration and assume the defaults for all options we don t mention explicitly. A cache configuration in ehcache.xml for the Category class may look like this:
We recommend high quality webhost to host and run your jsp application: christian web host services.