Caching your queries
Just like all other elements, database queries can be cached as we have seen in the caching framework. At the end of the chapter, we will look at caching these with memcached and DbFinderPlugin.
ETags
An entity tag ( ETag) is one of the HTTP headers that is returned to the browser. Its purpose is to inform the browser if the page has changed since it was last viewed. To enable this per environment, open the application's settings.yml file from apps/frontend/config/settings.yml and set it to on:
dev:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug: on
cache: off
no_script_name: off
etag: on
Less requests
As I mentioned, once a page is formed, your browser reads the HTML and then retrieves all the required resources. For example, most pages contain external links to stylesheets and JavaScript files. For each one that is encountered, the browser must make another request to the...