Skip to content
Navigation

设置反向代理站点全局缓存

开启或关闭反向代理站点的全局代理缓存(静态资源缓存)。

POST
https://your-panel.example.com:8888/mod/proxy/com/set_global_cache/stype
更新于 查看 Markdown

Request bodyX-WWW-FORM-URLENCODEDrequired

  • request_timestringrequired

    Unix 时间戳。

  • request_tokenstringrequired

    按 API 概览生成的签名。

  • site_namestringrequired

    站点名称

  • cache_status/dintegerrequired

    1 开启,0 关闭

  • actionset_global_cacherequired

    具体操作名称。

  • expiresoptionalstring

    过期时间,默认 1d(如 12h, 30m)

Returns

default

接口响应,业务状态见下方详细说明。

各操作详细说明

set_global_cacheaction=set_global_cache设置反向代理站点全局缓存

开启或关闭反向代理站点的全局代理缓存(静态资源缓存)。

  • 路由:POST /mod/proxy/com/set_global_cache/stype
  • action:set_global_cache

输入参数

参数名称 必选 类型 描述
site_name 是 string 站点名称
cache_status/d 是 int 1 开启,0 关闭
expires 否 string 过期时间,默认 1d(如 12h, 30m)

示例

请求

curl -X POST ".../mod/proxy/com/set_global_cache/stype" \
  -d "site_name=example.com&cache_status=1&expires=1d"

响应

{"code": 0, "status": true, "msg": "设置成功!"}

Type to search…

↑↓ navigate↵ selectEsc close