Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/fcfa998a3190d7e9c313 to your computer and use it in GitHub Desktop.
Save abhirockzz/fcfa998a3190d7e9c313 to your computer and use it in GitHub Desktop.
A custom annotation to configure Cache Control parameters
@Retention(RUNTIME)
@Target({FIELD, PARAMETER})
public @interface CachControlConfig {
public boolean isPrivate() default true;
public boolean noCache() default false;
public boolean noStore() default false;
public boolean noTransform() default true;
public boolean mustRevalidate() default true;
public boolean proxyRevalidate() default false;
public int maxAge() default 0;
public int sMaxAge() default 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment