Add whitelist support to OPcache
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- backend, performance
Direção de pesquisa
Comece examinando a configuração opcache.blacklist_filename existente do OPcache e o comportamento de inicialização do PHP-FPM descrito na proposta. Determine onde devem ficar a configuração de whitelist e a exclusividade entre blacklist/whitelist; considera-se concluído quando somente os arquivos incluídos na whitelist são armazenados em cache e o PHP-FPM falha na inicialização quando ambas as configurações estão definidas.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C
- Estrelas
- 40.4k
- Forks
- 8.2k
- Merge médio
- 2d 17h
- PRs com merge (30d)
- 115
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de php/php-src
-
Bug Status: Needs Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
Bug Status: Needs Triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
-
Bug Status: Needs Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Flaky hrtime.phpt test AbertaBug Category: Tests Status: Verified
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Bug SAPI: fpm Status: Needs Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Todas as issues de php/php-src
Issues semelhantes
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 60/100
-
Nmap
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
flang:fir-hlfir
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
llvm/llvm-project#225935 ·