简体   繁体   English

APC是否缓存.ini文件?

[英]Does APC cache .ini files?

I am deciding whether or not to use .ini format vs. standard PHP variables/constants in a file holding my app's configuration information. 我正在决定是否在保存应用程序配置信息的文件中使用.ini格式与标准PHP变量/常量。 One of my considerations is APC's ability to cache the ini file. 我考虑的因素之一是APC缓存ini文件的能力。 If it can, I assume it will speed up my app, as well as reduce reading the config file from the disk on each page load... 如果可以的话,我认为它将加快我的应用程序的速度,并减少每次加载页面时从磁盘读取配置文件的速度。

Not normally. 不正常。 APC only caches files which are loaded and executed as PHP code. APC仅缓存作为PHP代码加载并执行的文件。 .ini files are not PHP code, so they are not cached automatically. .ini文件不是PHP代码,因此不会自动缓存。

Your application can store anything it wants in the APC variable cache, though, including the contents of the .ini file. 但是,您的应用程序可以在APC变量高速缓存中存储所需的任何内容,包括.ini文件的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM