The expensive operation we're aiming to avoid, (3 second cost per invocation)
function expensiveOperation (input) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      const output = 'result'
      cache.write(input, output)
      resolve(output)
    }, 3000)
  })
}