You are here

function boost_rules_action_clear_page in Boost 6

Clears a page from the Boost cache

File

./boost.rules.inc, line 28
Integration with the rules module

Code

function boost_rules_action_clear_page($page, $settings) {
  if (file_exists(boost_file_path($page, FALSE))) {
    $expire_now = $settings['expire_now'];
    boost_cache_expire_derivative(array(
      $page,
    ), $expire_now, $expire_now);
    if (BOOST_VERBOSE >= 5) {
      watchdog('boost', 'Rules flushed !page from static page cache.', array(
        '!page' => $page,
      ));
    }
  }
}