You are here

function akamai_page_cache_control_form_submit in Akamai 7

Same name and namespace in other branches
  1. 6.2 akamai.module \akamai_page_cache_control_form_submit()
  2. 6 akamai.module \akamai_page_cache_control_form_submit()
  3. 7.3 akamai.module \akamai_page_cache_control_form_submit()
  4. 7.2 akamai.module \akamai_page_cache_control_form_submit()

Submit handler for akamai_page_cache_control.

Purge the 'path' variable from the Akamai cache.

File

./akamai.module, line 164
akamai.module Integration with the Akamai CDN Cache Control Web Service.

Code

function akamai_page_cache_control_form_submit($form, &$form_state) {
  $values = $form_state['values'];
  $path = $values['path'];
  $did_clear = akamai_clear_url($path, array(), $form['#node']);
  if ($did_clear) {
    $message = t("Akamai Cache Request has been made successfully, please allow 10 minutes for changes to take effect.");
    drupal_set_message($message);
  }
  else {
    drupal_set_message(t("There was a problem clearing the cache for this page.  Check your log messages for more information."), 'error');
  }
}