I’m working on very big project – quiz system (examination). And have a few questions about it. First of all,which is the best solution:
1) Getting all pages contents from MySQL database and creating php cache
or
2) Saving page contents in static files?
Which solution will work faster that other one?
Baseline-html
Baseline-html is always faster than PHP because PHP needs to be invoked.
But luckily PHP is pretty fast and almost does not have any performance impact when you write optimized PHP code. PHP is a dynamic language so less is more.
APC
Furthermore if you plan on working on a big site the first thing you should install is APC. From the WIKI page:
In-memory Database
To further speed up any big site you really need to use in-memory database like Redis(I like this) or Memcached. All big sites use one of these. For example Facebook, Twitter could not run without Memcached(Redis would also work but they went with Memcached). This will also really speed up your website.