Add Expires or Cache-Control headers
The Expires and Cache-Control headers determine how long a browser should keep a resource in its cache. You should therefore use them, and configure them correctly for CSS style sheets, JavaScript scripts and images.
Ideally, these elements should be kept as long as possible so that the browser does not request them again from the server. This saves HTTP requests, bandwidth and CPU power server-side.
Use a templating engine
Templating engines, like Smarty and Twig, almost always provide a system for caching compiled templates in a binary file containing an intermediate code called bytecode.
This often considerably reduces CPU usage, especially when an intermediate code cache is added to the templating engine’s cache system.








