Sorry for my english...
I think XOOPS make lot of SQL request for make a page.
I think is due to an Object view againts a Relational view... Is not a XOOPS problem is a general problem.
I don't say is a good way or not it's just a fact i see all days in my work too...
In a long time ago (lol) we may make just one sql requete to have a user, his groups and permissions for example. Now with object view we make one for user, one for his groups and one for his permissions...
The two ways have good purpose (and bad too).
In a general ways, i think it's very 'bizarre' to make cached file (an a long time we use file, after we have database (hierarchique etc... and after relationnal) and now we use relational like flat file and we put data on file for cache. I think computer science is a cycle
)
We have risk for synchronize data with that way... in a website with lot of access, you can have problem on file system etc... etc... on some system, you have a limit on number of file under folder: in windows, but in Linux (or Unix system) , i don't remember if you have this limit, but i know you have limit on shell (an 'ls' command on a great folder with lot of file can give you special result, and the result is not the same on sh, or ksh)
If you have lot of file on folder, i think you can have a bad surprise.
For another way, you can have your database in an other computer... then database access don't use CPU but use time on discuss between the two computers. etc...
I think you can make an optimisation on database before.
You have this one way :
http://www.howtogeek.com/howto/programming/speed-up-your-web-site-with-mysql-query-caching/http://www.mysqlperformanceblog.com/We can use MEMORY table on MySQL to optimize access too
http://dev.mysql.com/doc/refman/5.0/en/memory-storage-engine.html(in fr)
http://dev.mysql.com/doc/refman/5.0/fr/memory-storage-engine.html(we can put in memory table data from XOOPS we use a lot... block, permission, etc...)
(ok we have the same problem with synchronisation...)
For a choice between flat file vs dbb there is lot of subjet on internet... don't forget that dbb is specialize in access... ok it's work finally with file, but they make lot optimisation with cached etc... php i don't think it is specialize into.