Publish your MBTiles map with Mapcache

I recently tested a feature of MapCache that can let you publish an MBTiles map build with TileMill but without TileStream Server.   So all you have to do is to install Apache module Mapcache from Mapserver web site, add your mbtiles map in your config file and publish your map with OpenLayers.  I use this tutorial to install MapCache it from trunk.

My Mapcache config for my hexagonal GHS map is here.
<cache name="mbtiles" type="mbtiles">
    <dbname_template>/my/path/mbtiles/GasEmission-v5.mbtiles</dbname_template>
</cache>
<tileset name="gazemi">
    <cache>mbtiles</cache>
    <format>PNG</format>
    <grid>g</grid>
</tileset>

I specified a predefined grid "g" as the default "GoogleMapsCompatible" grid. You don't have to specified this gridset it in your mapcache.xml config file.  Look in the mapcache.xml.sample to find out the complete specification of this predefined grid.

In OpenLayers, I use a WMTS Layer for my MBTiles map.
var wmts = new OpenLayers.Layer.WMTS({
 name: "Gas emission (MBTile)",
 url: "http://simonmercier.net/mapcache/wmts/",
 layer: "gazemi",
 matrixSet: 'g',
 format: 'image/png',
 style: 'default',
 gutter:0,buffer:0,isBaseLayer:true,transitionEffect:'resize',
 resolutions:[156543.03392804099712520838,78271.51696402048401068896,39135.75848201022745342925,19567.87924100512100267224,9783.93962050256050133612,4891.96981025128025066806,2445.98490512564012533403,1222.99245256282006266702,611.49622628141003133351,305.74811314070478829308,152.87405657035250783338,76.43702828517623970583,38.21851414258812695834,19.10925707129405992646,9.55462853564703173959,4.77731426782351586979,2.38865713391175793490,1.19432856695587897633,0.59716428347793950593],
 zoomOffset:0,
 units:"m",
 maxExtent: new OpenLayers.Bounds(-20037508.342789,-20037508.342789,20037508.342789,20037508.342789),
 projection: new OpenLayers.Projection("EPSG:900913".toUpperCase()),
 sphericalMercator: true

 });
This is the same mbtiles file but publish with TileStream server.