2 Making components cacheable

There is a special attribute for the <:component:> tag, called cache. If you set cache to the string ``yes'' or ``true'', the called component will have its output cached to the SkunkWeb server's disk. Setting it to the string ``no'' or ``false'', or not setting it at all, turns caching off.

The next time you call the same component with the same attribute names and values (that is, the same arguments), the SkunkWeb server won't bother to execute the component. Instead, it will just read the cached output from disk. It's a great speed increase for your application.

If you call the component with different attributes names and values, the SkunkWeb server creates a different cached output file for those new attributes. If you say:

<:component foo.comp cache=yes arg="hi":>

and then later

<:component foo.comp cache=yes arg="blah" arg2=`5`:>

then SkunkWeb will keep two different cached output files for foo.comp: one file for when it is called with arg="hi", and one file for when it's called with arg="blah" and arg2=`5`. Get it?

As to setting when a cached component will expire, (see section 4.5, page ).