play.cache.CacheFor Maven / Gradle / Ivy
package play.cache;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Cache an action's result.
*
* If a time is not specified, the results will be cached for 1 hour by default.
*
*
Example: @CacheFor("1h")
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface CacheFor {
String value() default "1h";
String id() default "";
}