function ape_cache_set in Advanced Page Expiration 8
Same name and namespace in other branches
- 7 ape.module \ape_cache_set()
Statically cache an expiration length.
Parameters
int $new_age: The new value for age.
Return value
int The resulting max age.
1 call to ape_cache_set()
- ApeSubscriber::onRespond in src/
EventSubscriber/ ApeSubscriber.php - Sets extra headers on successful responses.
File
- ./
ape.module, line 52 - Allows finer control of the Cache Control header.
Code
function ape_cache_set($new_age = NULL) {
$max_age =& drupal_static(__FUNCTION__);
if (!isset($max_age)) {
$max_age = NULL;
}
if (is_null($max_age) && !is_null($new_age)) {
$max_age = $new_age;
}
return $max_age;
}