function protected_node_boost_is_cacheable in Protected Node 7
Same name and namespace in other branches
- 6 protected_node.module \protected_node_boost_is_cacheable()
- 1.0.x protected_node.module \protected_node_boost_is_cacheable()
Implements hook_boost_is_cacheable().
Prevent boost from caching protected nodes.
@todo We also need to make sure the cache gets cleared whenever the protection is turned on.
File
- ./
protected_node.module, line 1182 - Protected Node module.
Code
function protected_node_boost_is_cacheable($path) {
if (arg(0) == 'node' && is_numeric(arg(1))) {
// If protected, do not cache (i.e. not caching == return FALSE).
return array(
'is_cacheable' => !protected_node_isset_protected(arg(1)),
);
}
return array(
'is_cacheable' => TRUE,
);
}