You are here

function skinr_exit in Skinr 7.2

Same name and namespace in other branches
  1. 8.2 skinr.module \skinr_exit()

Implements hook_exit().

See also

module_implements_write_cache()

File

./skinr.module, line 497
Handles core Skinr functionality.

Code

function skinr_exit($destination = NULL) {
  $implementations =& drupal_static('skinr_implements');

  // Check whether we need to write the cache. We do not want to cache hooks
  // which are only invoked on HTTP POST requests since these do not need to be
  // optimized as tightly, and not doing so keeps the cache entry smaller.
  if (isset($implementations['#write_cache']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD')) {
    unset($implementations['#write_cache']);
    cache_set('skinr_implements', $implementations, 'cache_bootstrap');
  }
}