All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kasinf.framework.rest.annotation.EnableQueryCache Maven / Gradle / Ivy

The newest version!
package com.kasinf.framework.rest.annotation;

import java.lang.annotation.*;

/**
 * 开启查询缓存
 *
 * 父类标注了查询缓存后,子类不标注则继承父类的查询缓存规则
 * 子类也可以标注此注解,覆盖父类的规则
 *
 * @author lkhsh
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface EnableQueryCache {

    /**
     * 是否开启 Hibernate 查询缓存
     * @return true 开启;false 不开启
     */
    boolean value() default true;

    /**
     * 缓存区域,可对缓存进行细粒度控制。
     * @return 缓存区域,例如:query.cache.person
     */
    String region() default "";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy