Skip to content

Commit

Permalink
Editor: Only cache GET requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 30, 2024
1 parent c4b3e6e commit 92f40ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions editor/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,13 @@ async function networkFirst( request ) {

}

const cache = await caches.open( cacheName );
cache.put( request, response.clone() );
if ( request.method === 'GET' ) {

const cache = await caches.open( cacheName );
cache.put( request, response.clone() );

}

return response;

} catch {
Expand Down

0 comments on commit 92f40ca

Please sign in to comment.