angelnikolov / ts-cacheable

Observable/Promise Cache Decorator
https://npmjs.com/package/ts-cacheable
ISC License
340 stars 42 forks source link

ETag Caching #23

Closed ebingeorge2006 closed 5 years ago

ebingeorge2006 commented 5 years ago

Does this work with ETag?

angelnikolov commented 5 years ago

@ebingeorge2006 Can you elaborate a bit more on that?

tmburnell commented 5 years ago

https://en.wikipedia.org/wiki/HTTP_ETag

To me ETag sounds like a server side managed caching (client does have to send the tag back up though).

Where the library here is strictly client-side, and only knows to refresh if one of the following is true: 1) The cache limit has been hit 2) Request params have changed 3) A buster function has been called

angelnikolov commented 5 years ago

@ebingeorge2006 as @tmburnell, the library only covers client-side in-memory caching so I guess - yes, it should work with any ETag implementation you have, but it does not provide it.