This example is the same but with the long placeholder syntax. It's here because it's a Cheetah FAQ whether to put the cache interval inside or outside the braces. (It's also here so I can look it up because I frequently forget.) The answer is: outside. The braces go around only the placeholder name (and perhaps some output-filter arguments.)
The template:
Timed with {}: $*.5m*{voom}
The output:
Timed with {}: Voom!
The generated code differs only in the comment. Inside the cache-refresh if-block:
write(filter(VFS(SL,"voom",1))) # generated from '$*.5m*{voom}' at line 1, #col 17.
The reason this example is here is because it's a Cheetah FAQ whether to
put the cache interval inside or outside the {}
. (Also so I can look
it up when I forget, as I frequently do.) The answer is: outside. The
{}
go around only the placeholder name and arguments. If you do it
this way:
Timed with {}: ${*.5m*voom} ## Wrong!
Timed with {}: ${*.5m*voom}
${
is not a valid placeholder, so it's treated as ordinary text.