Full page (disk) caching
For items that only depend on the CMS resources to be updated, you can use the <se:cachefile /> state macro. This macro creates file cache from the full output of the publication engine, and works quite a bit differently than the <se:cache></se:cache> container macro.
Where the cache macro simply caches anything inside its tags in memory, the cachefile macro establishes state inside the rendering process, and can be addressed using viper methods.
In the simplest setup, you simply put an <se:cachefile /> statement in the page or rendertemplate, and the page will be cached until AIM invalidates it. You will use this type of file caching for your binary data, such as images, video, pdf, javascript etc...
In more complex scenarios, the cachefile macro's extension viper methods can be used to trigger cache usage, after you have done the computations necessary to see whether the existing cache is valid. In this case, use <se:cachefile transfer="false" /> and address the macro's state using the ignore() and the serve() methods.