summaryrefslogtreecommitdiff
path: root/include/mbgl/storage/response.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/storage/response.hpp')
-rw-r--r--include/mbgl/storage/response.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/storage/response.hpp b/include/mbgl/storage/response.hpp
index 6c79f5e181..4dc3f36681 100644
--- a/include/mbgl/storage/response.hpp
+++ b/include/mbgl/storage/response.hpp
@@ -32,6 +32,10 @@ public:
optional<Timestamp> modified;
optional<Timestamp> expires;
optional<std::string> etag;
+
+ bool isFresh() const {
+ return !expires || *expires > util::now();
+ }
};
class Response::Error {