缓存规则 websocket测试 POST http://47.75.9.94:2222/api/v1/cdn/web/domain/edit/cache/cache 请求参数 参数名 类型 描述 必填 domain json 域名和组别二选一 必填 groupId int 域名和组别二选一 必填 cache json 缓存信息 必填 type int 类型: 1=文件名后缀 2=目录路径 3=全路径 4=首页 必填 priority int 优先级 必填 time int 缓存过期时间(秒) 必填 regexp string 内容 必填 unit string 单位 , s=秒,m=分,h=小时,d=天 必填 说明 / 示例 请求示例 ``` { "domain": [ "163.com", "m.163.com", "www.163.com" ], "groupId": 0, "cache":[ { "type":1, "priority":3, "time":1, "regexp":[ "\\.(gif|jpg|png|bmp|ico|css|js1)$" ], "unit":"m" }, { "type":1, "priority":5, "time":1, "regexp":[ "\\.(gif|jpg|png|bmp|ico|css|js)$" ], "unit":"h" }, { "type":1, "priority":4, "time":1, "regexp":[ "\\.(gif|jpg|png|bmp|ico|css|js)$" ], "unit":"d" } ] } ``` 返回示例 ``` { "status": 200, "timestamp": 1628522874, "message": "success", "data": { "fails": [] } } ```
请求示例 ``` { "domain": [ "163.com", "m.163.com", "www.163.com" ], "groupId": 0, "cache":[ { "type":1, "priority":3, "time":1, "regexp":[ "\\.(gif|jpg|png|bmp|ico|css|js1)$" ], "unit":"m" }, { "type":1, "priority":5, "time":1, "regexp":[ "\\.(gif|jpg|png|bmp|ico|css|js)$" ], "unit":"h" }, { "type":1, "priority":4, "time":1, "regexp":[ "\\.(gif|jpg|png|bmp|ico|css|js)$" ], "unit":"d" } ] } ``` 返回示例 ``` { "status": 200, "timestamp": 1628522874, "message": "success", "data": { "fails": [] } } ```