You are here

function skinr_exit in Skinr 8.2

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

Implements hook_exit().

@todo hook_exit() no longer exists.

See also

module_implements_write_cache()

File

./skinr.module, line 571
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']);

    // @todo Fix cache bin.
    \Drupal::cache('bootstrap')
      ->set('skinr_implements', $implementations);
  }
}