Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Do not cache with Cache API if cache mode is only-if-cached #70

Merged
merged 1 commit into from
Jul 22, 2018

Conversation

akihikodaki
Copy link
Contributor

The previous implementation tried to cache only-if-cached by changing
request mode but it doesn't work because the property is readonly.

However, caching responses cached with HTTP Cache again with Cache API
does not make sense anyway. Just do not cache it, and leave it to HTTP
cache.

Resolves #34 (comment). I made this change according to WHATWG Fetch Standard. Please tell me if you found something incompatible with the specification.

The previous implementation tried to cache only-if-cached by changing
request mode but it doesn't work because the property is readonly.

However, caching responses cached with HTTP Cache again with Cache API
does not make sense anyway. Just do not cache it, and leave it to HTTP
cache.
@Rich-Harris Rich-Harris merged commit 04e2ad5 into sveltejs:master Jul 22, 2018
@Rich-Harris
Copy link
Member

this makes sense, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants