public function SiteAuditCheckCachePageExpire::calculateScore in Site Audit 7
Same name and namespace in other branches
- 8.2 Check/Cache/PageExpire.php \SiteAuditCheckCachePageExpire::calculateScore()
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
Cache/ PageExpire.php, line 72 - Contains \SiteAudit\Check\Cache\PageExpire.
Class
- SiteAuditCheckCachePageExpire
- Class SiteAuditCheckCachePageExpire.
Code
public function calculateScore() {
global $conf;
if (!isset($conf['page_cache_maximum_age']) || !$conf['page_cache_maximum_age']) {
if (site_audit_env_is_dev()) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}
elseif ($conf['page_cache_maximum_age'] >= 900) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}