下圖為 ab 壓測結(jié)果 下圖為 status 截圖 服務(wù)器為2H2G 不知道什么原因 失敗率較高 有些進(jìn)程沒有請求數(shù) 'count' => cpu_count() * 4, 'reusePort' => true,...
class SystemConfig extends BaseModel { // 數(shù)據(jù)表名稱 protected $name = 'system_config'; // 當(dāng)前模型實(shí)例緩存 private static ?SystemConfig $_instance = null; /** * 獲取當(dāng)前模型實(shí)例 * @return SystemConfi...
正常PHP-FPM模式下 static可以用做當(dāng)前請求的全局緩存 如下列代碼: class Model { static $cache = null; public function getCache(){ if(self::$cache === null) { ... self::$cache = ...; } ...
namespace app\model; use Illuminate\Redis\Connections\Connection; use think\db\Query; use think\Model; class Config extends Model { // 數(shù)據(jù)表名稱 protected $name = 'config'; /** * 模型查詢器 * @r...