def get(key: String) = Cached("key-" + key, duration = 3600) {
Action {
Ok(some_method)
}
}
Cache.set("item.key", null, 0)
public static Result index() {
Result cachedResult = (Result) Cache.get("applicationIndex");
if (cachedResult == null) {
Result res = ok(index.render("Ready " + Math.random()));
Cache.set("applicationIndex", res, 5);
cachedResult = res;
}
return cachedResult;
}
Cache.set("applicationIndex", null, 0)