Add whitelist support to OPcache
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- backend, performance
Línea de trabajo
Comience examinando la configuración existente opcache.blacklist_filename de OPcache y el comportamiento de inicio de PHP-FPM descrito en la propuesta. Determine dónde deben ubicarse la configuración de whitelist y la exclusividad entre blacklist/whitelist; se considera terminado cuando solo se almacenan en caché los archivos incluidos en whitelist y PHP-FPM falla al iniciar cuando ambas configuraciones están configuradas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C
- Estrellas
- 40.4k
- Forks
- 8.2k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 115
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de php/php-src
-
Bug Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Bug Status: Needs Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Bug Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Flaky hrtime.phpt test AbiertoBug Category: Tests Status: Verified
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Bug SAPI: fpm Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Todos los issues de php/php-src
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
bradcypert/plum#53 ·
-
Component: GLib
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Status: Opened
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
nextbsd/nextbsd-userland#285 ·