Пример #1
0
bool response::is_cacheable() const
{
    return state == BODYFULL && checkCacheControl()
        && get_header("ETag") != ""
        && get_header("Vary") == ""
        && get_code() == "200";
}
Пример #2
0
bool http_response::is_cacheable() const {
    return (state == FULL_BODY
            && checkCacheControl()
            && get_header("ETag") != ""
            && get_header("Vary") == ""
            && get_code() == "200");
}