|I find these blogs by yourself very interesting, as they cover quite more detail the the standard "PHP help" and "PHP security" articles i come across.|
One thing i have a problem with (yes i am still learning, and using a budget server) is the database issues. The sites i have, mainly are browser games, so obviously this creates extreme stress on the server. I have previously thought about Cache-ing my data, but due to more or less every page been unique i dont know how to cache only parts of the site (if that is possible) such as the header and footers. Sorry if i you are thinking i am been lazy and should look for myself, but i just thought i would ask (and taking note of the statement about poor articles i find).
But a very good idea about the que table. I will think about this, as this is some thing i may have to use.
|2007-05-29 15:32:54 - In reply to message 1 from Leeming|
|Yes, in games you cannot avoid personalization to much because each turn depends on the player context.|
Still, I think you can analyse your database accesses and use caches to prevent retrieving the same database results, even though you do not have much to cache in your game HTML pages.
What you can do is to store frequently retrieved database results in arrays, serialize the array into a string, and the store the serialized string in a cache.
It is not worth caching page headers and footers when those are not built from data retrieved from database.
You can however use a cached template engine like Smarty, and use a PHP code cache extension like Turck, APC, eAccelerator, etc.. to speedup execution. I have not mentioned that in this article, but it is a very important step to deal with server overload.