diff options
| author | fengweihao <[email protected]> | 2023-12-29 14:39:03 +0800 |
|---|---|---|
| committer | fengweihao <[email protected]> | 2023-12-29 14:39:03 +0800 |
| commit | ced991b4a0569f52fbae33aa8ce15c9d4ea6bda7 (patch) | |
| tree | f28257f66772f6dcdf130d82272054dddfe6dc59 /cache/include/tango_cache_pending.h | |
| parent | b011a9268042db22cc54ca8171640dbfb2ab617c (diff) | |
TSG-18286 Proxy支持虚拟表表名变更,删除代理本地缓存,删除tsg-http相关配置v4.8.56-20231229
Diffstat (limited to 'cache/include/tango_cache_pending.h')
| -rw-r--r-- | cache/include/tango_cache_pending.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/cache/include/tango_cache_pending.h b/cache/include/tango_cache_pending.h deleted file mode 100644 index 0c72635..0000000 --- a/cache/include/tango_cache_pending.h +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - -#include<time.h> -#include<tfe_http.h> - -enum cache_pending_action { - UNDEFINED = 0, - ALLOWED, - FORBIDDEN, - REVALIDATE -}; - - -struct tfe_http_field { - - enum tfe_http_std_field http_field; - const char* value; -}; - - -struct request_freshness { - time_t min_fresh; - time_t max_age; -}; - - -struct response_freshness{ - time_t date; - time_t last_modified; - time_t timeout; -}; - - -time_t read_GMT_time(const char* gmt_string); -/* -函数功能: -根据请求头字段判断是否允许将缓存作为该请求的响应,并且将请求字段对缓存新鲜度的约束范围作为传出参数返回给调用者 -参数: -request:HTTP请求字段信息,包括Pragma,Cache-Control,If-Match,If-None-Match,If-Modified-Since,If-Unmodified-Since字段 -n_fields:request包含的HTTP请求字段数目 -restrict:如果该函数返回值为ALLOWED,则返回请求Cache-Control字段包括的min-fresh或者max-age值;否则返回值为0 -返回值: -UNDEFINED = 0,//请求字段中未定义缓存的行为 -ALLOWED ,//允许使用缓存作为该请求的响应 -FORBIDDEN,//禁止使用缓存作为该请求的响应,需要向源服务器请求 -REVALIDATE,//禁止使用未验证有效性的缓存作为该请求的响应 -*/ -enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *request, struct request_freshness* restrict); - - - -/* -函数功能: -根据响应字段判断该响应是否允许被缓存,并且将响应的新鲜度、date或者last-modified值作为传出参数返回给调用者 -参数: -response:HTTP响应字段信息,包括Pragma,Cache-Control,Expires、Date、Last-Modified字段 -n_fields:response包含的HTTP响应字段数目 -freshness:如果该函数返回值为ALLOWED,则返回响应Cache-Control字段的s-maxage/max-age值以及Date字段、Last-Modified字段相对时间 -返回值: -UNDEFINED = 0,//响应字段中未定义缓存的行为 -ALLOWED ,//允许缓存该响应 -FORBIDDEN,//禁止缓存该响应 -*/ -enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *response, struct response_freshness* freshness); |
