You are here

function boost_nodeapi in Boost 5

Same name and namespace in other branches
  1. 6 boost.module \boost_nodeapi()

Implementation of hook_nodeapi(). Acts on nodes defined by other modules.

File

./boost.module, line 227
Provides static page caching for Drupal.

Code

function boost_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  if (!BOOST_ENABLED) {
    return;
  }
  switch ($op) {
    case 'insert':
    case 'update':
    case 'delete':

      // Expire all relevant node pages from the static page cache to prevent serving stale content:
      if (!empty($node->nid)) {
        boost_cache_expire('node/' . $node->nid, TRUE);
      }
      break;
  }
}