站点全局配置接口
更新时间:2026-07-08
设置站点全局配置
您可以根据API文档获取您想要设置的站点全局配置项的详细参数信息。
PHP
1$client = new EoClient($EO_CONFIG);
2$cacheTtl = array(
3 'cacheTtl' => array(
4 array(
5 'value' => '/',
6 'weight' => 100,
7 'override_origin' => false,
8 'ttl' => 10,
9 'type' => 'path',
10 ),
11 ),
12);
13
14// 配置cacheTtl,其他配置同理
15
16$resp = $client->setSiteConfig('test-sdk-eo.baidu.com', $cacheTtl);
17
18print_r($resp);
查询站点全局配置
PHP
1$client = new EoClient($$EO_CONFIG);
2$resp = $client->getSiteConfig('test-sdk-eo.baidu.com');
3
4// 全部站点配置
5print_r($resp);
6// 某项配置如 cacheTtl
7print_r($resp->cacheTtl);
评价此篇文章
