Add whitelist support to OPcache
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 45/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Domaine
- backend, performance
Piste de recherche
Commencez par examiner la configuration opcache.blacklist_filename existante d'OPcache et le comportement de démarrage de PHP-FPM décrit dans la proposition. Déterminez où doivent se trouver la configuration de whitelist et l'exclusivité entre blacklist/whitelist ; le travail est terminé lorsque seuls les fichiers de la whitelist sont mis en cache et que PHP-FPM échoue au démarrage lorsque les deux paramètres sont configurés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- C
- Étoiles
- 40.4k
- Forks
- 8.2k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 115
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de php/php-src
-
Bug Status: Needs Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Bug Status: Needs Triage
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
Bug Status: Needs Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Flaky hrtime.phpt test OuverteBug Category: Tests Status: Verified
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Bug SAPI: fpm Status: Needs Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
Toutes les issues de php/php-src
Issues similaires
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 60/100
-
Nmap
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
flang:fir-hlfir
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
llvm/llvm-project#225935 ·