This tutorial explains, in detail, how you can create caching strategies for your Service Worker and Progressive Web App to simplify writing the code that handles any situation for every file request. Create reusable functions that work for any website for handling your fetch requests and cache requests.
Code from video: https://github.com/prof3ssorSt3v3/cache-strategies