@@ -8,8 +8,6 @@ Reduce cache size by [Redisson][2] SnappyCodec (see [snappy-java][snappy], [Fast
8
8
9
9
### Note
10
10
11
- Redisson 2.5.0 has a known issue with ElasticacheServers config see https://github.com/redisson/redisson/pull/672 .
12
-
13
11
From 2.2.1 onwards Hibernate region naming (hibernate.cache.region_prefix) has been simplified to "hibernate".
14
12
15
13
hibernate-core 5.2.x based on Java 8, use hibernate-redis 2.2.0 or higher
@@ -26,7 +24,7 @@ add dependency
26
24
<dependency >
27
25
<groupId >com.github.debop</groupId >
28
26
<artifactId >hibernate-redis</artifactId >
29
- <version >2.3.0 </version >
27
+ <version >2.3.2 </version >
30
28
</dependency >
31
29
```
32
30
@@ -51,9 +49,9 @@ Redisson support various codec (serializer, compression). you can choose other c
51
49
</dependency >
52
50
```
53
51
54
- ##### setup hibernate configuration
52
+ ##### Setup hibernate configuration
55
53
56
- setup hibernate configuration (Note package name for hibernate 4 / hibernate 5 / hibernate52)
54
+ Setup hibernate configuration (Note package name for hibernate 4 / hibernate 5 / hibernate52)
57
55
58
56
``` java
59
57
// Secondary Cache
@@ -62,20 +60,20 @@ props.put(Environment.USE_QUERY_CACHE, true);
62
60
props. put(Environment . CACHE_REGION_FACTORY , org.hibernate.cache.redis.hibernate52. SingletonRedisRegionFactory . class. getName());
63
61
props. put(Environment . CACHE_REGION_PREFIX , " hibernate" );
64
62
65
- // optional setting for second level cache statistics
63
+ // Optional setting for second level cache statistics
66
64
props. setProperty(Environment . GENERATE_STATISTICS , " true" );
67
65
props. setProperty(Environment . USE_STRUCTURED_CACHE , " true" );
68
66
69
- // for Hibernate 4
67
+ // Hibernate 4
70
68
props. setProperty(Environment . TRANSACTION_STRATEGY , JdbcTransactionFactory . class. getName());
71
69
72
- // configuration for Redis that used by hibernate
70
+ // Configuration for Redis that used by hibernate
73
71
props. put(Environment . CACHE_PROVIDER_CONFIG , " hibernate-redis.properties" );
74
72
```
75
73
76
74
also same configuration for using Spring Framework or [ Spring Data JPA] [ 4 ]
77
75
78
- ### redis settings for hibernate-redis
76
+ ### Redis settings for hibernate-redis
79
77
80
78
sample for hibernate-redis.properties
81
79
0 commit comments