Closed gautamarora closed 7 years ago
The "precaching" that sw-toolbox
provides is a one-time addition to the a given cache, with no effort to keep those resources up to date. The most effective use of SW caching is to include versioning information about precached resources as part of a build-time process, and use that versioning information to keep those resources up to date.
It's somewhat unfortunate that sw-toolbox
used the method name precache()
, which ends up steering folks towards a less efficient solution. We've taken to de-emphasizing that functionality, and pointing people towards sw-precache
for their precaching needs. (Or Workbox, which provides a unified interface for both pre- and runtime caching.)
The sw-toolbox readme seems to suggest that if pre-caching is required, then sw-precache should be chosen.
However, sw-toolbox does support precaching with the toolbox.precache.
Is there a particular reason why the sw-toolbox readme is so explicit in pointing users to sw-precache for precaching and not using the method available already?
The reason I am bringing up this issue is because the first time I read the readme, I assumed that sw-precache provides both precaching and runtime caching while sw-toolbox provides only runtime caching, but that was not a correct assumption.