-
-
Save anonymous/aab5992ab4cf5d22b2d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Inherited | |
@ViewMetaData(override = true) | |
@Target(ElementType.TYPE) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Documented | |
public @interface HttpCache | |
{ | |
HttpCacheType value(); | |
int unit(); | |
String time(); | |
} | |
public enum HttpCacheType | |
{ | |
NEVER, | |
MINUTES, | |
HOURS, | |
DAYS, | |
MANUAL | |
} | |
@Page(basePath = "/") | |
public interface TestViewConfig extends ViewConfig | |
{ | |
@Page | |
@HttpCache(value = HttpCacheType.NEVER) // no cache | |
class ViewB implements TestViewConfig { } | |
@Page | |
@HttpCache(value = HttpCacheType.HOURS, unit = 1) // cache now + 1 hour | |
class ViewA implements TestViewConfig { } | |
@Page | |
@HttpCache(value = HttpCacheType.MANUAL, time = "23:59:59") // cache till today 23:59:99 | |
class ViewC implements TestViewConfig { } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment