Ldp
6
TileCache works at another level. It provides a TMS to e.g. OpenLayers, and calls mapnik to render requested tiles. Mapnik does all the postgis stuff.
Maybe mod_tile’s renderd.py script may help you to understand metatiling? On the NL tileserver, we run a python script in Cherokee, to call the mod_tile’s renderd to actually render tiles for us. Find rullzer on irc.oftc.net for details of the Cherokee script.