<check-modified> conditionally return a not modified response

name
check-modified
xml namespace
http://moyaproject.com

Return a not_modifed (304) response if a resource hasn't changed.

This tag allows a view to skip generating a page if it hasn't changed since the last time a browser requested it. To use this tag, set either the etag parameter, or the time parameter, which should be the time the page was last modified. Moya will compare these attributes to the request headers, and generate a not modified (304) response if the page hasn't changed. Otherwise the view will continue processing as normal.

Example

<view libname="view.show_post" template="post.html">
    <db:get model="#Post" let:slug=".url.slug"/>
    <check-modified time="post.updated_date" />
</view>
attributes
name purpose type required? default choices
etag ETag for resource text No
time Time resource was updated expression No None
inherited attributes
name purpose type required? default choices
if Conditional expression expression No yes