[core] add support for stale responses
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.
This commit is contained in:
@@ -6,10 +6,14 @@
|
||||
namespace mbgl {
|
||||
|
||||
class Response {
|
||||
public:
|
||||
bool isExpired() const;
|
||||
|
||||
public:
|
||||
enum Status { Error, Successful, NotFound };
|
||||
|
||||
Status status = Error;
|
||||
bool stale = false;
|
||||
std::string message;
|
||||
int64_t modified = 0;
|
||||
int64_t expires = 0;
|
||||
|
||||
Reference in New Issue
Block a user