Closed geerteltink closed 8 years ago
You have used ConfigManager::ENABLE_CACHE => true. Is there a reason why the file is not configured like this: ConfigManager::CACHE_FILE => 'data/config-cache.php' ?
If you had cache file name read from the configuration, then whole caching would be pointless - you would need to do the merging before being able to access cached file. Besides that, having ConfigManager::ENABLE_CACHE
as a boolean value allows you to enable cache during deployment process by simply putting a file in your config/autoload
directory.
Why did you not include zend-stdlib and use ArrayUtils instead: https://github.com/mtymek/expressive-config-manager/blob/master/src/ConfigManager.php#L35-L60
I was using zend-stdlib
it initially, but at some point (inspired by this and a few other topics) I decided to decouple this library from that dependency.
If you had cache file name read from the configuration, then whole caching would be pointless - you would need to do the merging before being able to access cached file...
I'm not sure what I was thinking when I wrote that question. Obviously I didn't think it through :D
I was using zend-stdlib it initially, but at some point (inspired by this and a few other topics) I decided to decouple this library from that dependency.
Makes sense.
Thanx for the reply.
Haha no worries, I it is not the first time somebody asks this question :D Initially I also felt into the same trap and actually started coding it...
Uhm, since I already coded it myself in the expressive skeleton I think I should be worried :(
You have used
ConfigManager::ENABLE_CACHE => true
. Is there a reason why the file is not configured like this:ConfigManager::CACHE_FILE => 'data/config-cache.php'
?Why did you not include zend-stdlib and use ArrayUtils instead: https://github.com/mtymek/expressive-config-manager/blob/master/src/ConfigManager.php#L35-L60
If you want and agree to the changes I can make PR's for it.