1 #pragma once
2 
3 #include <mbgl/util/optional.hpp>
4 #include <mbgl/util/chrono.hpp>
5 
6 #include <string>
7 
8 namespace mbgl {
9 namespace http {
10 
11 class CacheControl {
12 public:
13     static CacheControl parse(const std::string&);
14 
15     optional<uint64_t> maxAge;
16     bool mustRevalidate = false;
17 
18     optional<Timestamp> toTimePoint() const;
19 };
20 
21 optional<Timestamp> parseRetryHeaders(const optional<std::string>& retryAfter,
22                                       const optional<std::string>& xRateLimitReset);
23 
24 } // namespace http
25 } // namespace mbgl
26