/* * Copyright (c) 2025, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace RequestServer { String serialize_url_for_cache_storage(URL::URL const&); u64 create_cache_key(StringView url, StringView method); bool is_cacheable(StringView method, u32 status_code, HTTP::HeaderMap const&); bool is_header_exempted_from_storage(StringView name); AK::Duration calculate_freshness_lifetime(HTTP::HeaderMap const&); AK::Duration calculate_age(HTTP::HeaderMap const&, UnixDateTime request_time, UnixDateTime response_time); bool is_response_fresh(AK::Duration freshness_lifetime, AK::Duration current_age); }