You are here

function authcache_node_view in Authenticated User Page Caching (Authcache) 7.2

Implements hook_node_view().

File

modules/authcache_node_history/authcache_node_history.module, line 58
Provide personalization for the comment module.

Code

function authcache_node_view($node, $view_mode, $langcode) {
  $page_node = menu_get_object();
  if (authcache_page_is_cacheable() && $page_node && $node->nid == $page_node->nid) {

    // Ensure that the static cache of node_last_viewed gets populated.
    node_last_viewed($node->nid);

    // Attach the call to node-tag-new to the render array.
    $node->content['#attached']['authcache_node_history_node_tag_new'][] = array(
      $node->nid,
    );
  }
}