Fix getOrFetchPromise errors getting stuck cached

This commit is contained in:
Cadence Ember 2020-07-16 23:41:00 +12:00
parent f1f24f8c4a
commit 8f0890f0ad
No known key found for this signature in database
GPG Key ID: 128B99B1B74A6412
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ class RequestCache extends TtlCache {
return this.getOrFetch(key, callback).then(result => {
this.cache.delete(key)
return result
}).catch(error => {
this.cache.delete(key)
throw error
})
}
}