tgvashworth / ServiceWorker-Polyfill

[DEPRECATED] JavaScript ServiceWorker implementation, enabling exploration by authors.
66 stars 7 forks source link

Asyncify AsyncMap #3

Closed tgvashworth closed 10 years ago

tgvashworth commented 10 years ago

The AsyncMap is not async - it should return promises for setting and getting.

Why does it need to be async?

e.respondWith(
  cache.add(
    e.request.url, 
    fetch(e.request.url)
  )
)

What does it mean to have a promise-based forEach or every?

tgvashworth commented 10 years ago

Closing becuase this issue doesn't make sense (a Cache isn't an AsyncMap), and becuase I think this already works.