Created
March 11, 2018 21:18
-
-
Save ritikrishu/7ababce149c06f6d08e7863d9008fd3e to your computer and use it in GitHub Desktop.
finding if a cache name exists in CacheStorage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Suppose CacheStorage these named cache - "name 1", "Some-other-name" | |
*/ | |
console.log( | |
await caches.has("name 1") | |
)// <- true | |
console.log( | |
await caches.has("name 2") | |
)// <- false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment