code: function getTemplate(filename, options, callback) {
  
    // cache
    if (options && options.cache) {
      var fromCache = cache.get(filename);
      if (fromCache) {
        //console.log('cache hit');
        return callback(null, fromCache);
      }
      //console.log('cache miss');
    }
  
    var isAsync = callback && typeof callback === 'function';
  
    // function to call when retieved template
    function done(err, template) {
  
      // cache
      if (options && options.cache && template) {
        cache.set(filename, template);
      }
  
      if (isAsync) {
        callback(err, template);
      }
  
      return template;
    }
  
    // sync
    if (!isAsync) {
      return done(null, buildTemplate(filename, options));
    }
  
    // async
    buildTemplate(filename, options, done);
  }
docs: Retrieves a template given a filename.
  Uses cache for optimization (if options.cache is true).
  If callback is passed, it will be called asynchronously.
  @param {String} filename The path to the template
  @param {Object} options The option sent by express
  @param {Function} [callback] (Optional) The async node style callback