Gatsby does a great job of caching content in a Progressive Web App. But if you are writing your own app from scratch and not using Gatsby, you might need a little help. Google Workbox is a toolkit for creating PWAs that gives you full control of the service worker. You can find a full walkthrough in the Workbox documentation, but we'll go through a targeted version here.