nytris/antilag
最新稳定版本:v0.0.3
Composer 安装命令:
composer create-project nytris/antilag
包简介
README 文档
README
Caches filesystem hits during early Nytris boot when open_basedir is enabled,
prior to Nytris Boost starting.
Usage
Install this package with Composer:
$ composer require nytris/antilag
Configure Nytris platform:
nytris.config.php
<?php declare(strict_types=1); use Nytris\Antilag\AntilagPackage; use Nytris\Antilag\Stage; use Nytris\Boot\BootConfig; use Nytris\Boot\PlatformConfig; $bootConfig = new BootConfig(new PlatformConfig(__DIR__ . '/var/cache/nytris/')); $bootConfig->installPackage(new AntilagPackage(stage: Stage::STAGE_2)); // (Other Nytris packages, Nytris Boost is recommended...) $bootConfig->installPackage(new AntilagPackage(stage: Stage::STAGE_3)); return $bootConfig;
Invoke Stage 1 as early as possible
e.g. from a front controller:
app.php
<?php if (getenv('ENABLE_NYTRIS_ANTILAG') !== 'no') { require dirname(__DIR__) . '/vendor/nytris/antilag/antilag.php'; Antilag::stage1(); } // Using Symfony as an example: $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); // ...
See also
统计信息
- 总下载量: 3.84k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-26