派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.qxueyou.scc.base.handler;
 
import java.lang.annotation.Retention;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface QCacheReader {
    //缓存时间单位枚举(秒,分,时)
    public enum TimeUnit{SECOND,MINUTE,HOUR,DAY};
        
    public enum ClearStrategy {KEY,TAG};
    
     //缓存的KEY
    public String cacheKey();
    
    //标签 方便多数据的清理
    public String bucket() default "";
    
    //阀值(暂不用)
    public int threshold() default 0;
    
    //缓存时长
    public int cacheTime() default 60;
     
    //缓存时间单位(默认秒)
    public TimeUnit timeUnit() default TimeUnit.SECOND;
     
}