派生自 projectDept/qhighschool

胡仁荣
2022-10-31 fe7381d6e8ec1f427408de0297ac7f41533202f6
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;
     
}