Add whitelist support to OPcache
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- backend, performance
調査の方向性
まず、既存の OPcache の opcache.blacklist_filename 設定と、提案で説明されている PHP-FPM の起動動作を調べてください。whitelist 設定と blacklist/whitelist の排他性をどこに配置すべきかを決定してください。完了の条件は、whitelist に登録されたファイルだけがキャッシュされ、両方の設定が構成されている場合に PHP-FPM が起動時に失敗することです。
索引モデルが issue の本文から書いたものです。
説明
Description
OPcache currently supports excluding files using opcache.blacklist_filename. This works well when the number of files to exclude is small.
However, in a multi-tenant application, the opposite can be true. There may be a large number of tenant-specific files that should not be cached, while only a small set of common application files should be cached.
For example, instead of maintaining:
/var/www/tenant-a/*
/var/www/tenant-b/*
/var/www/tenant-c/*
...
it would be useful to define the files that are allowed to be cached:
opcache.whitelist_filename=/path/to/whitelist
with:
/var/www/app/src/*
/var/www/app/vendor/*
The behavior would simply be the inverse of the blacklist: when a whitelist is configured, only matching files are cached.
I think blacklist and whitelist should be mutually exclusive, with PHP-FPM failing at startup if both are configured.
This would be particularly useful for applications where the set of files that should be cached is small and well-defined, while the set of files to exclude is large or dynamic.
I'm happy to implement this and open a PR if this proposal makes sense.
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 103
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/php-src のほかの issue
-
Bug SAPI: cli_server Status: Verified
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
Bug Status: Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Bug Category: Tests Status: Verified
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
FujiNetWIFI/fujinet-firmware#1649 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
HarbourMasters/Shipwright#7229 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
riscv-software-src/riscv-isa-sim#2435 · コメント 1 件 ·