function hook_authcache_backend_cache_save in Authenticated User Page Caching (Authcache) 7.2
Save a page to the cache.
Parameters
string $body: The body of the document, when page_compression is true and the gzip extension is available, this will contain gzipped data. It is still possible to get hold of the original uncompressed data using ob_get_contents().
array $headers: The headers which will be delivered along with the document.
bool $page_compressed: Flag set to TRUE when $body contains gzipped data.
3 functions implement hook_authcache_backend_cache_save()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- authcache_backend_test_authcache_backend_cache_save in tests/
authcache_backend_test.module - Implements hook_authcache_backend_cache_save().
- authcache_builtin_authcache_backend_cache_save in modules/
authcache_builtin/ authcache_builtin.module - Implements hook_authcache_backend_cache_save().
- authcache_varnish_authcache_backend_cache_save in modules/
authcache_varnish/ authcache_varnish.module - Implements hook_authcache_backend_cache_save().
4 invocations of hook_authcache_backend_cache_save()
- authcache_admin_config in ./
authcache.admin.inc - Main Authcache configuration form.
- authcache_backend_cache_save in ./
authcache.cache.inc - Collect document and headers and pass them to cache backends.
- authcache_debug_authcache_debug_info in modules/
authcache_debug/ authcache_debug.module - Implements hook_authcache_debug_info().
- authcache_requirements in ./
authcache.install - Implements hook_requirements().
File
- ./
authcache.api.php, line 256 - Authcache API documentation.
Code
function hook_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);
}