You are here

function uc_ajax_cart_exit in Ubercart AJAX Cart 6.2

Implements hook_exit().

Code from CacheExclude - http://drupal.org/project/cacheexclude

File

./uc_ajax_cart.module, line 425

Code

function uc_ajax_cart_exit() {
  global $base_root;
  $pages = array(
    'uc_ajax_cart',
    UC_AJAX_CART_ADD_CALLBACK,
    UC_AJAX_CART_REMOVE_CALLBACK,
    UC_AJAX_CART_SHOW_CALLBACK,
    UC_AJAX_CART_LINK_CALLBACK,
    UC_AJAX_CART_UPDATE_CALLBACK,
    UC_AJAX_CART_SHOW_VIEW_CALLBACK,
  );
  $this_page = request_uri();
  foreach ($pages as $page) {
    if ($page && strstr($this_page, $page) !== FALSE) {
      cache_clear_all($base_root . $this_page, 'cache_page');
      return;
    }
  }
}