Commit Graph

6 Commits

Author SHA1 Message Date
Konstantin Käfer
8ee222c45e [core] allow creating optional requests
Introduces "optional" requests. These should be fulfilled by the FileSource only there's a low-cost/easy way to obtain the data (e.g. from a local cache). If the data for an optional request cannot be found, it *must* return a Response object with a NotFound error.

Traditional "required" requests still work the same way, with one change: If you set any prior* field in the Resource (i.e. priorModified, priorEtag, or priorExpires), the DefaultFileSource assumes that you already have the cache value and will not consult the cache before performing the request. If a prior cache lookup didn't turn up any data, and you therefore don't have an Etag or Modified value, you can still skip the cache by setting priorExpires. This will of course always result in a non-conditional HTTP request.
2016-05-18 12:40:22 +02:00
Konstantin Käfer
cd65a43855 [core] move from microsecond precision timestamp to integer second precision 2016-05-13 17:24:22 +02:00
John Firebaugh
7de9e196d7 [tests] Rationalize storage tests
Properly divide Storage tests into DefaultFileSource, OnlineFileSource, and HTTPFileSource tests.
2016-04-14 14:18:19 -07:00
John Firebaugh
169755e89a [core] Unify FileRequest and WorkRequest 2016-03-24 10:54:32 -07:00
Konstantin Käfer
c587eefbb1 [ios] make unit tests work on iOS and iOS Simulator 2016-03-22 11:56:01 -07:00
John Firebaugh
cdedb66387 [core] Reimplement existing caching within an offline-capable database schema 2016-02-10 15:40:20 -08:00