This supports caching the config ini file. It would be enabled through
$matomoDir/bootstrap.php by putting this code in there (we cannot use DI or config file for this because they don't exist at the time of the config loading):
<?php $GLOBALS['ENABLE_CONFIG_PHP_CACHE'] = true; $GLOBALS['MATOMO_PLUGIN_DIRS'] = array(); // this line is unrelated... just another setting we added recently by using bootstrap.php
It would pretty much only work for single server environments... all others would have the problem that the cache invalidation when the config changes wouldn't be synced. Also we do not want to have to document that users need to invalidate the cache when they make changes to it. It would pretty much only help us and I would probably not even document it. When loaded from a regular filesystem, it should be still very fast with the regular ini. If it works nicely, we could document it eventually.
By caching it, it would come from opcache instead of filesystem... and we would not need to do things like all these decodings etc https://github.com/matomo-org/component-ini/blob/master/src/IniReader.php#L149-L384
Any thoughts on this @mattab
As discussed we're wanting to give this a try.