支持缓存校验。
This commit is contained in:
8
cache/include/tango_cache_pending.h
vendored
8
cache/include/tango_cache_pending.h
vendored
@@ -7,7 +7,7 @@ enum cache_pending_action {
|
||||
UNDEFINED = 0,
|
||||
ALLOWED,
|
||||
FORBIDDEN,
|
||||
VERIFY
|
||||
REVALIDATE
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ struct response_freshness{
|
||||
time_t timeout;
|
||||
};
|
||||
|
||||
|
||||
time_t read_GMT_time(const char* gmt_string);
|
||||
/*
|
||||
函数功能:
|
||||
根据请求头字段判断是否允许将缓存作为该请求的响应,并且将请求字段对缓存新鲜度的约束范围作为传出参数返回给调用者
|
||||
@@ -41,7 +43,7 @@ restrict:如果该函数返回值为ALLOWED,则返回请求Cache-Control字段
|
||||
UNDEFINED = 0,//请求字段中未定义缓存的行为
|
||||
ALLOWED ,//允许使用缓存作为该请求的响应
|
||||
FORBIDDEN,//禁止使用缓存作为该请求的响应,需要向源服务器请求
|
||||
VERIFY,//禁止使用未验证有效性的缓存作为该请求的响应
|
||||
REVALIDATE,//禁止使用未验证有效性的缓存作为该请求的响应
|
||||
*/
|
||||
enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *request, struct request_freshness* restrict);
|
||||
|
||||
@@ -59,4 +61,4 @@ UNDEFINED = 0,//响应字段中未定义缓存的行为
|
||||
ALLOWED ,//允许缓存该响应
|
||||
FORBIDDEN,//禁止缓存该响应
|
||||
*/
|
||||
enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *response, struct response_freshness* freshness);
|
||||
enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *response, struct response_freshness* freshness);
|
||||
|
||||
Reference in New Issue
Block a user