If using service workers without a library seems too daunting to you (and it can be a bit daunting), you might want to try this library by Google Developers. It comes with some popular strategies, and makes implementing these strategies relatively easy; haven’t tested it myself though.