[英]Will php reload file content from filesystem when opcache is enable and use 'require' keyword?
我的应用程序使用require
加载应用程序路由,像这样
require __DIR__ . '/Order.php';
我有开放的opcache
扩展,配置是
enable_cli=1
memory_consumption=128
interned_strings_buffer=8
max_accelerated_files=4000
revalidate_freq=60
fast_shutdown=1
opcache.save_comments=0
我想知道php是否重新加载__DIR__ . '/Order.php'
__DIR__ . '/Order.php'
从文件系统的每一个要求,即使opcache
是启用。
是的,如果要避免这种情况,请使用require_once
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.