<commit_before>Hibernate SpringCache
=====================

[![DevOps By Rultor.com](http://www.rultor.com/b/candrews/hibernate-springcache)](http://www.rultor.com/p/candrews/hibernate-springcache)
[![Build Status](https://travis-ci.org/candrews/hibernate-springcache.svg?branch=master)](https://travis-ci.org/candrews/hibernate-springcache)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.integralblue/hibernate-springcache/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.integralblue/hibernate-springcache)
[![Reference Status](https://www.versioneye.com/java/com.integralblue:hibernate-springcache/reference_badge.svg?style=flat-square)](https://www.versioneye.com/java/com.integralblue:hibernate-springcache/references)
[![Dependency Status](https://www.versioneye.com/java/com.integralblue:hibernate-springcache/badge?style=flat-square)](https://www.versioneye.com/java/com.integralblue:hibernate-springcache)
[![Javadoc](https://javadoc-emblem.rhcloud.com/doc/com.integralblue/hibernate-springcach/badge.svg)](http://www.javadoc.io/doc/com.integralblue/hibernate-springcach)

Hibernate SpringCache is a Hibernate cache implementation that backs to the Spring Cache abstraction.
In other words, setup caching once in Spring then use it from Spring and Hibernate so configuration isn't duplicated.

This project has been submitted to Hibernate for inclusion: https://github.com/hibernate/hibernate-orm/pull/1639

Quick Start
===========
* **Minimum requirements** — You'll need Java 1.8+, Hibernate 5.2.6+, and Spring 4.3+. Spring Boot 1.4+ is optional.
* **Download** — Depend on this libary using, for example, Maven:
```xml
  <dependency>
    <groupId>com.integralblue</groupId>
    <artifactId>hibernate-springcache</artifactId>
    <version>[INSERT VERSION HERE]</version>
    <type>jar</type>
  </dependency>
```
* In application.properties, add:
`spring.jpa.properties.hibernate.cache.region.factory_class=com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactory`
* If using Spring Boot, that's it - `com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryAutoConfigure` will take care of the rest.
* If not not using Spring boot, the `com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryBeanPostProcessor` bean post processor must be registered (add it as a bean using Spring Java or XML configuration).<commit_msg>Fix typo in Javadoc badge<commit_after>Hibernate SpringCache
=====================

[![DevOps By Rultor.com](http://www.rultor.com/b/candrews/hibernate-springcache)](http://www.rultor.com/p/candrews/hibernate-springcache)
[![Build Status](https://travis-ci.org/candrews/hibernate-springcache.svg?branch=master)](https://travis-ci.org/candrews/hibernate-springcache)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.integralblue/hibernate-springcache/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.integralblue/hibernate-springcache)
[![Reference Status](https://www.versioneye.com/java/com.integralblue:hibernate-springcache/reference_badge.svg?style=flat-square)](https://www.versioneye.com/java/com.integralblue:hibernate-springcache/references)
[![Dependency Status](https://www.versioneye.com/java/com.integralblue:hibernate-springcache/badge?style=flat-square)](https://www.versioneye.com/java/com.integralblue:hibernate-springcache)
[![Javadoc](https://javadoc-emblem.rhcloud.com/doc/com.integralblue/hibernate-springcache/badge.svg)](http://www.javadoc.io/doc/com.integralblue/hibernate-springcache)

Hibernate SpringCache is a Hibernate cache implementation that backs to the Spring Cache abstraction.
In other words, setup caching once in Spring then use it from Spring and Hibernate so configuration isn't duplicated.

This project has been submitted to Hibernate for inclusion: https://github.com/hibernate/hibernate-orm/pull/1639

Quick Start
===========
* **Minimum requirements** — You'll need Java 1.8+, Hibernate 5.2.6+, and Spring 4.3+. Spring Boot 1.4+ is optional.
* **Download** — Depend on this libary using, for example, Maven:
```xml
  <dependency>
    <groupId>com.integralblue</groupId>
    <artifactId>hibernate-springcache</artifactId>
    <version>[INSERT VERSION HERE]</version>
    <type>jar</type>
  </dependency>
```
* In application.properties, add:
`spring.jpa.properties.hibernate.cache.region.factory_class=com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactory`
* If using Spring Boot, that's it - `com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryAutoConfigure` will take care of the rest.
* If not not using Spring boot, the `com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryBeanPostProcessor` bean post processor must be registered (add it as a bean using Spring Java or XML configuration).
{'fraction_non_alphanumeric': 0.14309346567411083, 'fraction_numerical': 0.005376344086021506, 'mean_word_length': 6.208643815201192, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 20, 'lorem ipsum': 0, 'www.': 14, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4163706', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1409, 'n_words': 277}