public final class CacheContract
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
cacheable
是否启用二级缓存,默认不启用
true 启用 false 不启用 |
static CacheContract |
CACHEABLE
启用二级缓存的配置对象
cacheable = true |
org.hibernate.CacheMode |
cacheMode
设置缓存模式
|
java.lang.String |
cacheRegion
设置缓存放入的区域名称
|
| Constructor and Description |
|---|
CacheContract(boolean cacheable)
构造函数
|
CacheContract(boolean cacheable,
org.hibernate.CacheMode cacheMode)
构造函数
|
CacheContract(boolean cacheable,
org.hibernate.CacheMode cacheMode,
java.lang.String cacheRegion)
构造函数
|
CacheContract(boolean cacheable,
java.lang.String cacheRegion)
构造函数
|
public static final CacheContract CACHEABLE
public boolean cacheable
public org.hibernate.CacheMode cacheMode
public java.lang.String cacheRegion
public CacheContract(boolean cacheable)
cacheable - 是否启用二级缓存public CacheContract(boolean cacheable,
org.hibernate.CacheMode cacheMode)
cacheable - 是否启用二级缓存cacheMode - 缓存模式public CacheContract(boolean cacheable,
java.lang.String cacheRegion)
cacheable - 是否启用二级缓存cacheRegion - 缓存存放区域名称public CacheContract(boolean cacheable,
org.hibernate.CacheMode cacheMode,
java.lang.String cacheRegion)
cacheable - 是否启用二级缓存cacheMode - 缓存模式cacheRegion - 缓存存放区域名称