// Cache posts // Limits the number of posts that gets cached to 3 // Reads a piece of front-matter in each post that directs the second loop to the folder where the assets are held urlsToCache.push("/blog/how-does-user-research-help-us-at-carousell/") urlsToCache.push("/blog/iot/") urlsToCache.push("/blog/snapmaps/") // Cache pages // Do nothing if it's either an AMP page (as these are served via Googles cache) or the blog page // Fallback to the offline pages for these urlsToCache.push("/about/") urlsToCache.push("/elements/") urlsToCache.push("/") urlsToCache.push("/offline/") // Cache assets // Removed assets/posts because I only want assets from the most recent posts getting cached urlsToCache.push("/assets/js/jquery.min.js") urlsToCache.push("/assets/js/jquery.scrollex.min.js") urlsToCache.push("/assets/js/jquery.scrolly.min.js") urlsToCache.push("/assets/js/main.js") urlsToCache.push("/assets/js/skel.min.js") urlsToCache.push("/assets/js/util.js") urlsToCache.push("/sw.js")