You are here

function authcache_builtin_authcache_backend_cache_save in Authenticated User Page Caching (Authcache) 7.2

Implements hook_authcache_backend_cache_save().

Cache storage handler for drupal builtin cache-system

File

modules/authcache_builtin/authcache_builtin.module, line 13
Authcache storage backend for Drupal core cache system.

Code

function authcache_builtin_authcache_backend_cache_save($body, $headers, $page_compressed) {
  $cid = authcache_builtin_cid();
  $data = array(
    'path' => $_GET['q'],
    'body' => $body,
    'title' => drupal_get_title(),
    'headers' => $headers,
    // We need to store whether page was compressed or not,
    // because by the time it is read, the configuration might change.
    'page_compressed' => $page_compressed,
  );
  cache_set($cid, $data, 'cache_page', CACHE_TEMPORARY);

  // Add headers required to make stupid browsers behave.
  _authcache_builtin_cacheinc_fix_browsers();
}