We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Does Phalcon cache ini file into memory?

Does Phalcon cache ini file into memory?

use Phalcon\DI\FactoryDefault, Phalcon\Mvc\Micro, Phalcon\Config\Adapter\Ini;

$di = new FactoryDefault(); $di->set('config', function() { return new Ini("config.ini"); });



98.9k

No, it's parsed in every request



29.1k

How about to cache settings into memory and reload them only if it changed?

If you have a cache backend like memcache or other, you can dump the ini file there and pick it up upon load. That will speed things up for you. In reality though reading one file is not going to make a difference in your application.