You are here

function views_content_cache_comment in Views content cache 6.2

Implementation of hook_comment().

File

./views_content_cache.module, line 35
Views content cache cache.

Code

function views_content_cache_comment(&$a1, $op) {
  switch ($op) {
    case 'insert':
    case 'update':
    case 'delete':
    case 'publish':
    case 'unpublish':
      if (is_object($a1)) {
        $arr = (array) drupal_clone($a1);
      }
      else {
        $arr = $a1;
      }
      if (!empty($arr['nid']) && ($node = node_load($arr['nid']))) {
        views_content_cache_update_set($arr, 'comment');
      }
      break;
  }
}