Skip to content

Commit

Permalink
Added clarification about PHP restart.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter committed Mar 17, 2021
1 parent 74fde6b commit 9791086
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This package generates a [PHP preloading](https://www.php.net/manual/en/opcache.
## Requirements

* PHP 7.4.3, PHP 8.0 or later.
* [Opcache enabled](https://www.php.net/manual/en/book.opcache.php) (`ext-opcache`).
* [Opcache & Preloading enabled](https://www.php.net/manual/en/book.opcache.php) (`ext-opcache`).
* Composer Autoloader (optional).

## Installation
Expand Down Expand Up @@ -73,13 +73,13 @@ This will automatically gather Opcache statistics, and write an optimized `prelo
├── PreloaderCall.php
└── preload.php

Once generated, tell PHP to use this file as a preloader at startup in your `php.ini`.
Once generated, tell PHP to use this file as a preloader at start up in your `php.ini`.

```ini
opcache.preload=/www/app/preload.php
```

Restart your PHP process that's using Opcache, and that's all, you're good.
Once the script is generated, **you're encouraged to restart your PHP process** (or server, in some cases) to pick up the generated preload script. Only generating the script [is not enough](https://www.php.net/manual/en/opcache.preloading.php).

> If you use Preloader when Opcache is disabled or without hits, you will get an Exception.
Expand Down

0 comments on commit 9791086

Please sign in to comment.