Hibernate second-level cache-related attributes

Source: Internet
Author: User

The SessionFactory of Hibernate can hold an optional level-2 cache, which can improve the persistence access performance of Hibernate. Hibernate has the following attributes about level-2 Cache.

Hibernate. cache. provider_class: This attribute is used to set the Class Name of the second-level cache CacheProvider.

Hibernate. cache. use_minimal_puts: optimizes the level-2 cache at the cost of frequent read operations to minimize write operations. In Hibernate 3, this setting is very useful for cluster caching. It is enabled by default for implementation of cluster caching.

Hibernate. cache. use_query_cache: sets whether to allow querying the cache. Some queries still need to be explicitly set to cache.

Hibernate. cache. use_second_level_cache: Used to set whether second-level cache is enabled. This attribute completely disables second-level cache. Secondary cache is enabled by default for persistence classes specified in the ing file.

Hibernate. cache. query_cache_factory: sets the Class Name of the query cache factory. The query cache factory must implement the QueryCache interface. The default value of this attribute is the built-in StandardQueryCache.

Hibernate. cache. region_prefix: Set the prefix of the second-level cache zone name.

Hibernate. cache. use_structured_entries: Used to set whether to force Hibernate to store data in a second-level cache in a readable format.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.