跳到正文
Navigation

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

POST
https://your-panel.example.com:8888/mod/proxy/com/set_global_cache/stype

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

Request body application/x-www-form-urlencoded required

  • request_time
    string
    required

    Unix 时间戳。

  • request_token
    string
    required

    按 API 概览生成的签名。

  • site_name
    string
    required

    站点名称

  • cache_status/d
    integer
    required

    1 开启,0 关闭

  • action
    set_global_cache
    required

    具体操作名称。

  • expires
    optional
    string

    过期时间,默认 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