Added caching

Port of symfony-cmf/RoutingAutoBundle#78