/** * Preloads and caches the server type so it wont have to make query each time when is needed */ public static function return_and_cache_server_type() { $sgcachepress_options = new SG_CachePress_Options(); if (!$sgcachepress_options->is_enabled('checked_nginx')) { $sgcachepress_options->enable_option('checked_nginx'); if (SG_CachePress_Supercacher::return_check_is_nginx()) { $sgcachepress_options->enable_option('is_nginx'); return true; } else { $sgcachepress_options->disable_option('is_nginx'); return false; } } if ($sgcachepress_options->is_enabled('is_nginx')) { return true; } return false; }