192 Commits (cache)

Author SHA1 Message Date
Luke Childs b0d5704fc3 Fix comment alignment 8 years ago
Luke Childs ad9403aac3 Emit cache errors 8 years ago
Luke Childs 2616d534c1 Set cache as false by default 8 years ago
Luke Childs be12b61674 Pass cache option through as storage adadpter 8 years ago
Luke Childs 8bf25ab7f2 Wrap requests with cacheable-request 8 years ago
Vadim Demedes be7b80252a Add progress events (#322) 8 years ago
Luke Childs a4eb37b8d0 Error should be called `err` for consistency (#347) 8 years ago
Dreamacro c0c6bcf1ac Fix unix address parser (#339) 8 years ago
Philipp Beck 1cf2bbf8cf Support Array with the `json` option (#335) 8 years ago
Luke Childs ee405f4843 Add all helper functions in the same loop (#336) 8 years ago
Steven Vachon 3f117379e6 `url` arg optimizations (#329) 8 years ago
Luke Childs 714840904c Wrap all requests in cacheable-request for easier handling of native requests 8 years ago
Luke Childs 8f4b02b380 Extract caching logic into cacheable-request module 8 years ago
Luke Childs f9d19e3334 Add `decompress` option (#320) 8 years ago
Luke Childs e328719d17 Add `fromCache` property to response object 8 years ago
Sindre Sorhus 6fc1902805 Add ability to opt-out of using `electron.net` 8 years ago
DJ Madeira 7964f2cdef Request timeout (#308) 8 years ago
Luke Childs 1843cbaf48 Pass TTL to cache 8 years ago
DJ Madeira b45896aa4e Redirect on 307, 308, 303 (#307) 8 years ago
Alexander Tesfamichael a299b00834 Set up proxy event emitter before making a request (#304) 8 years ago
Sindre Sorhus 213057084c Improve use in Electron (#311) 8 years ago
Luke Childs b63a641245 Delete stale cache entries that can't be revalidated 8 years ago
Luke Childs 07a403c152 Revalidate stale cached responses that have Last-Modified/ETag headers. 8 years ago
DJ Madeira 359a5d17ec Use class syntax for errors (#306) 8 years ago
Luke Childs f6f915bae3 No point doing caching inside a function now it's only used once 8 years ago
Luke Childs 75a999545a Include stream processing inside cache function 8 years ago
Luke Childs 6212f165ee Move caching logic back into get() 8 years ago
Luke Childs 23d76e3fae Don't redo what getStream already does 8 years ago
Luke Childs 159c3994a8 Use pipe instead of manually piping inside data 8 years ago
Luke Childs d4cf24c421 Don't save buffer encoding, it's not needed 8 years ago
Luke Childs dbb7f206e5 Cache stream responses 8 years ago
Luke Childs 838821d5a5 Rafactor caching into external function and only read stream once 8 years ago
Alexander Tesfamichael f501fc2c7c Add WHATWG URL support (#289) 8 years ago
Alexander Tesfamichael 9ef7a5aab9 Add ability to cancel in-progress requests (#287) 8 years ago
Jakob Krigovsky c86706bd23 Only throw ParseError on 2xx responses (#301) 8 years ago
DJ Madeira 8b4d06ef31 Include response headers and redirect URLs in error object (#302) 8 years ago
Luke Childs a31c966e23 Store body data encoding so we can reliably convert to buffer 8 years ago
Luke Childs e4ae2c68b9 Don't serialize cache object to JSON 8 years ago
Luke Childs 39811aa860 Object destructuring on single line 8 years ago
Luke Childs b8b341166d Don't store stream in unnecessary variable 8 years ago
Luke Childs 903fbfaa84 Store status code and url in cache. Don't store headers. 8 years ago
Luke Childs b0490ca4a3 Simplify cache option check 8 years ago
Luke Childs b65128e113 Move cache read logic into separate function 8 years ago
Luke Childs 817de11b72 opts.cache API should match Map() API 8 years ago
Luke Childs 5ec945f527 Allow opts.cache.get to return value or Promise 8 years ago
Luke Childs 011ea0e50c Include method in cache key 8 years ago
Luke Childs 0d6180a279 If we retrieve a stale cache entry, delete it immediately 8 years ago
Luke Childs 0f6f944b9e Drop expired for http-cache-semantics 8 years ago
Sindre Sorhus 578f38d527 Set `url` and `requestUrl` directly on the response (#300) 8 years ago
Vsevolod Strukchinsky 14d0859261 reduce retries number and make delays shorter (#299) 8 years ago