Search code examples
phpapcini

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. One of my considerations is APC's ability to cache the ini file. 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...


Solution

  • Not normally. APC only caches files which are loaded and executed as PHP code. .ini files are not PHP code, so they are not cached automatically.

    Your application can store anything it wants in the APC variable cache, though, including the contents of the .ini file.