Caching ESI?

So I saw the blog of how to implement edge side includes using a worker. However, that article assumes that the esi content is dynamic. What if it’s not expected to change often? How would you cache the esi response? (This seems mildly interesting because the user-agent that needs to respect the cache headers is the Cloudflare worker.)