Is it cache or cache?

I read google slide in progressive web applications where they mentioned cache interface below methods

cache.add() 
cache.addAll()
cache..put()
cache.delete()
cache.keys()
cache.match()
cache.matchAll()

but in additional slides in a real implementation, they sometimes use the s cache (with s) and sometimes cache

caches.open()  // whereas this method was not mentioned anywhere

caches.keys() 
caches.delete()
caches.match()

cache.put () // only here using cache 

Also note the same in MDN

they write Cache.add, Cache.addAll and Cache.put (with capital c)

and using caches.open, cache.match () and other methods

I want to know that cache and caches are two different objects (or an interface) or what am I missing here?

Please provide some resources or links to learn more about this.

+4
source share
3

window.caches - CacheStorage , Cache. , window.caches.open() , Cache.

// Get a named Cache object from CacheStorage
window.caches.open('cachename').then(cache => {
    // Work with resolved cache object (instance of Cache)
});

, caches, CacheStorage, Cache - , Cache, /.

+8

, . ( Google Chrome) -

The cache list in Cache Storage can be seen in the Browser Developer Tool. , CacheStorage.

( " CacheStorage ", .)

+1

. , , , .

ConcurrentMap, . , ConcurrentMap , , . , , , . LoadCache , - .

0

Source: https://habr.com/ru/post/1686519/


All Articles