Caching Symfony controller

During developing this blog I invented one more bicycle for Caching Symfony controller. But first of all lets see how did this task arose.

For example, I have a list of categories, archives and tags on a sidebar. It is relatively easy to get last one (one query), but much harder to get list of categories and archives. For getting categories, we need to select trees (categories can be nested) and using subqueries inside queries get number of articles in every category (result is a little bit monster). For getting the archives list, we need iterate over all articles and gather list of years/months. All this actions isn't very sophisticated, but it is better to avoid them.

Pencil

Pencil - convenient open-source free prototyping tool for creating mockups. It is suitable for creating any user interfaces, but we will consider creating web interfaces.

Can be installed as a firefox plugin or as a standalone application (in this case, firefox was installed as a dependency).

Convenient for quickly creating a website page schema, so as not to draw on paper. It also allows you to add interactivity by linking pages. A simple and fast learning tool.

We will explain the installation and show an example of use.