| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Properly divide Storage tests into DefaultFileSource, OnlineFileSource, and HTTPFileSource tests.
|
| |
|
| |
|
|
|
|
| |
This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
|
| |
|
|
|
|
| |
Response::isExpired() had subtle and potentially confusing behavior around Seconds::zero(). It's best to inline it and comment why.
|
|
|
|
|
| |
When we introduce OfflineFileSource, the behavior of existing tests should
not change.
|
| |
|
|
|
|
|
|
|
| |
Added aliases for std::chrono typedefs (eg. 'Seconds' for
std::chrono::seconds). These aliases are used together with templated
helper functions to replace time_t with std::chrono::seconds for most
cases, in particular for 'modified' and 'expires' values in Response.
|
| |
|
| |
|
|
|
|
| |
This should be abstracted by util::RunLoop
|
| |
|
| |
|
|
|
|
| |
We're now returning stale responses from cache. Those responses will have the `stale` flag set to true. Currently, all requesters in the core code discard stale responses, and cancel the request immediately after they got a non-stale response.
|
|
|
|
| |
By not automatically destroying Request objects after the result has been delivered, we are making sure that we can potentially fire the callback multiple times without adverse effects. This means that you have to hold on to the result of fs->request(), can explicitly cancel it if you don't want to be notified of data changes anymore. Not doing so will monitor the request indefinitely and will prevent the app from exiting.
|
|
|
|
| |
Fixes #1336
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
we are now scoping all file requests to an environment object. The FileSource implementation treats
this as an opaque pointer, but allows canceling all Requests that are associated with that pointer.
This is necessary to abort all file requests that originated from a particular Map object. Aborting
a file request is different from canceling a file request: A canceled request doesn't have its
callback called, while an aborted request will have its callback called with an error, indicating
that the environment is going to be shut down.
|
| |
|
| |
|
| |
|
|
|