Your web presence is growing! Traffic and usage are escalating and you have to maintain a superior level of performance. The state of growth unfolds many opportunities but it also holds challenges as a result of change. Not only does performance affect your operating costs, it also reflects directly on the end-user experience. The marketing and sales departments are probably saying that happier users directly increase sales.
Code Acceleration is sometimes referred to as code caching. In fact it is very different from content caching because it caches the code and not the content. Code acceleration is at work when the server runs the script inside the PHP script engine.
By default, every time a PHP script is accessed, the script is parsed and compiled before it is executed. As long as the script does not change, parsing and compiling is redundant. Code caching maintains the compiled byte code version of the PHP script in memory, eliminating the need to parse and compile each time.
Code caching actively maintains the cached compiled scripts in a shared memory model, serving each process that is generated by the web server. For this reason, it is critical that the code accelerator be tightly integrated with the scripting engine, to ensure proper memory utilization and prevent failure.
Figure 3 -Code Acceleration
Query caching In dynamic web sites, the database server is more likely to become the bottleneck since every query has to be processed and the quality of service drops dramatically under heavy load.
In query caching, the cache contains a list of recently executed queries and their results. Whenever possible, a new query is satisfied by results already stored in the cache, thereby avoiding potentially large data scans.
This technique benefits web applications that run complex, process intensive queries. For web applications that run frequent small-scale queries, the latency caused by the travel time over the network will most likely overshadow the benefit from query caching.