If a view doesn’t really work very hard, should we be bothering to cache it? For example, a view that is just flat HTML or perhaps a couple of variable replacements.
The following Chelsea Project footer view sets a
@@cachestatus: 1 which defaults to 24 hrs.
Webskin caching should be used sparingly and only target those webskins that are expensive, i.e. webskins that take up significant resources to run (CPU, memory, DB requests, remote HTTP / API calls, file system access, etc).
In the above example it’s literally just outputting flat HTML with no processing at all. A webskin that executes in 0ms is generally a bad candidate for webskin caching, and so in this case the
@@cacheStatus: 1 webskin decorator should be removed.
Have updated the view – no doubt there are a few others in that code base, but i thought I’d strike while the iron is hot: