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.
27 lines
395 B
C++
27 lines
395 B
C++
#ifndef MBGL_STORAGE_RESPONSE
|
|
#define MBGL_STORAGE_RESPONSE
|
|
|
|
#include <string>
|
|
|
|
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;
|
|
std::string etag;
|
|
std::string data;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|