code: function calcMaxAge (val) {
    var num = typeof val === 'string'
      ? ms(val)
      : val
  
    return num != null
      ? Math.min(Math.max(0, num), ONE_YEAR_MS)
      : ONE_YEAR_MS
  }
docs: Calculate the max-age from a configured value.
  
  @private
  @param {string|number} val
  @return {number}