public function SiteAuditCheckBlockCache::calculateScore in Site Audit 7
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
Block/ Cache.php, line 66 - Contains \SiteAudit\Check\Block\Cache.
Class
- SiteAuditCheckBlockCache
- Class SiteAuditCheckBlockCache.
Code
public function calculateScore() {
global $conf;
if ($conf['block_cache']) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}
elseif (count(module_implements('node_grants'))) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}
// Block caching is off.
if (site_audit_env_is_dev()) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}