Web: People: Excluded caching of temp userPhotos

This commit is contained in:
Alexey Safronov 2020-09-02 18:10:05 +03:00
parent db0539a8fa
commit 5298c1d27c

View File

@ -23,7 +23,9 @@ if ("function" === typeof importScripts) {
// Image caching
workbox.routing.registerRoute(
// Cache image files.
({ request }) => request.destination === "image",
({ request, url }) =>
request.destination === "image" &&
url.pathname.indexOf("userPhotos/temp") === -1,
// Use the cache if it's available.
new workbox.strategies.CacheFirst({
// Use a custom cache name.