mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 12:55:41 +01:00
bugfix (cache): fix errors caught from the console
This commit is contained in:
parent
592b584c42
commit
5326bb1188
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
const CACHE_NAME = 'v0.0';
|
||||
const CACHE_NAME = 'v1.0';
|
||||
const DELAY_BEFORE_SENDING_CACHE = 2000;
|
||||
|
||||
/*
|
||||
|
|
@ -131,6 +131,7 @@ function smartCacheStrategy(request){
|
|||
function networkFirstStrategy(request){
|
||||
return new Promise(function(done, error){
|
||||
cache(request.clone && request.clone() || request).then(function(response){
|
||||
if(!response || !response.headers) return;
|
||||
response.headers.append('Content-Stale', 'yes');
|
||||
done(response);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue