function boost_comment in Boost 5
Same name and namespace in other branches
- 6 boost.module \boost_comment()
Implementation of hook_comment(). Acts on comment modification.
File
- ./
boost.module, line 205 - Provides static page caching for Drupal.
Code
function boost_comment($comment, $op) {
if (!BOOST_ENABLED) {
return;
}
switch ($op) {
case 'insert':
case 'update':
// Expire the relevant node page from the static page cache to prevent serving stale content:
if (!empty($comment['nid'])) {
boost_cache_expire('node/' . $comment['nid'], TRUE);
}
break;
case 'publish':
case 'unpublish':
case 'delete':
if (!empty($comment->nid)) {
boost_cache_expire('node/' . $comment->nid, TRUE);
}
break;
}
}