Add whitelist support to OPcache
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 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 天 17 小時
- 30 天內合併 PR
- 115
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
php/php-src 的其他 Issue
-
Bug Status: Needs Triage
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
Bug Status: Needs Triage
難度 1/5 1 小時以內 新手友好度 90/100
維護者通常 1 天內回覆
-
Bug Status: Needs Triage
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
Bug Category: Tests Status: Verified
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
Bug SAPI: fpm Status: Needs Triage
難度 2/5 1-3 小時 新手友好度 65/100
php/php-src#21740 · 1 個 reaction ·
維護者通常 1 天內回覆
相似的 Issue
-
area:lint-tooling bug
難度 2/5 1-3 小時 新手友好度 88/100
InauguralSystems/EigenScript#1340 ·
維護者通常 1 天內回覆
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFile未關閉
難度 2/5 1-3 小時 新手友好度 78/100
BasedHardware/omi#19047 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
obsproject/obs-studio#13936 · 2 則留言 ·
維護者通常 1 天內回覆
-
category:port-update
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆