Externalised output caching into separate npm module.