Skip to content

Commit

Permalink
SAM-65 disable static cache when running locally (#55)
Browse files Browse the repository at this point in the history
Disable static cache when running locally
  • Loading branch information
JoshuaCWebDeveloper committed Nov 18, 2022
1 parent 15c5d5e commit d8d05ec
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export const staticCacheHandler: Handler = (request, respondWith) => {
return;
}

// don't cache when running locally
if (process.env.NX_LOCAL === 'true') {
return;
}

// respond with asset from either cache or fetch
respondWith(
caches.open('pwa-static-cache').then(cache => {
Expand Down

0 comments on commit d8d05ec

Please sign in to comment.