CHAPTER 13 Optimizing (Linux web host) fetching and caching strategy you d
CHAPTER 13 Optimizing fetching and caching strategy you d like to use for each class and each collection. In the second step, you enable your preferred cache provider in the global Hibernate configuration and customize the provider-specific settings and physical cache regions. For example, if you re using OSCache, you edit oscache.properties, or for EHCache, ehcache.xml in your classpath. Let s enable caching for the CaveatEmptor Category, Item, and Bid classes. 13.4 Caching in practice First we ll consider each entity class and collection and find out what cache concurrency strategy may be appropriate. After we select a cache provider for local and clustered caching, we ll write their configuration file(s). 13.4.1 Selecting a concurrency control strategy The Category has a small number of instances and is updated rarely, and instances are shared between many users. It s a great candidate for use of the second- level cache. Start by adding the mapping element required to tell Hibernate to cache Category instances.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.