@args int val, int var @extends("main")
| code | result |
|---|---|
@verbatim(){
|
fixed tag without cachefixed: @testTagCacheTag(val)
variable tag without cachevariable: @testTagCacheTag(var) |
@verbatim(){
|
tag cache without parameterfixed: @testTagCacheTag(val).cache() variable: @testTagCacheTag(var).cache() |
@verbatim(){
|
fixed tag cache for "2s"fixed: @testTagCacheTag2(val).cache("2s")
variable tag cache for "2s"variable: @testTagCacheTag2(var).cache("2s") |
@verbatim(){
|
tag with body no cachefixed: @testTagCacheTag2(val) { random int: @(new Random().nextInt()) } variable: @testTagCacheTag2(var) { random int: @(new Random().nextInt()) } |
@verbatim(){
|
fixed tag with body cache no parameterfixed: @testTagCacheTag2(val).cache() { [@@testTagCacheTag2(val).cache()]random int: @(new Random().nextInt()) }
variable tag with body cache no parametervariable: @testTagCacheTag2(var).cache() { [@@testTagCacheTag2(var).cache()]random int: @(new Random().nextInt()) } |
@verbatim(){
|
tag with body cache for "3s"fixed: @testTagCacheTag(val).cache("3s") {[@@testTagCacheTag(val).cache("3s")] random int: @(new Random().nextInt()) }
fixed tag with body cache for 3 secondsfixed: @testTagCacheTag2(val).cache(3) {[@@testTagCacheTag2(val).cache(3)] random int: @(new Random().nextInt()) }
fixed tag with body cache for "3s" using variable as additional cache parameterfixed: @testTagCacheTag2(val).cache(3, System.currentTimeMillis()) {[@@testTagCacheTag2(val).cache(3, System.currentTimeMillis())] random int: @(new Random().nextInt()) }
variable tag with body cache for "3s"variable: @testTagCacheTag2(var).cache("3s") {[@@testTagCacheTag2(var).cache("3s")] random int: @(new Random().nextInt()) } |