Configuration file caching

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lath
Forum Newbie
Posts: 3
Joined: Wed Oct 03, 2007 9:35 pm

Configuration file caching

Post by lath »

I'm using the Zend Config framework to load my framework's configuration settings from a xml file. Do you think it's worth it to serialize the Zend_Config_Xml class into a text file as a sort of cache'd config file so that it doesn't have to parse the xml config file every request?

Obviously, the larger the configuration file the more expensive it will be to load. I wonder at what point it becomes more expensive to load the xml file each time than opening the file and running the unserialize to create the object? 25 settings, 50 settings? Any guesses? Or even better has anybody profiled this to find out for sure?
Post Reply