Ubah konfigurasi cache.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:UpdateCacheRule |
update |
*Site
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
ID situs. Untuk mendapatkan ID ini, panggil operasi ListSites. |
123456**** |
| ConfigId |
integer |
Yes |
ID konfigurasi. |
35281609698**** |
| RuleName |
string |
No |
Nama aturan. Parameter ini opsional untuk konfigurasi global. |
rule_example |
| RuleEnable |
string |
No |
Mengontrol apakah aturan diaktifkan. Parameter ini opsional untuk konfigurasi global. Nilai yang valid:
|
on |
| Rule |
string |
No |
Ekspresi kondisional yang cocok dengan permintaan pengguna. Parameter ini opsional untuk konfigurasi global. Dua skenario didukung:
|
(http.host eq \"video.example.com\") |
| BypassCache |
string |
No |
Mode bypass cache. Nilai yang valid:
|
cache_all |
| BrowserCacheMode |
string |
No |
Mode cache browser. Nilai yang valid:
|
no_cache |
| BrowserCacheTtl |
string |
No |
TTL (Time to Live) cache browser, dalam detik. |
300 |
| EdgeCacheMode |
string |
No |
Mode cache untuk node edge. Nilai yang valid:
|
follow_origin |
| EdgeCacheTtl |
string |
No |
TTL (Time to Live) cache node edge, dalam detik. |
300 |
| EdgeStatusCodeCacheTtl |
string |
No |
TTL cache untuk kode status tertentu, dalam detik.
|
5xx=0,404=10 |
| SortQueryStringForCache |
string |
No |
Mengontrol apakah parameter query string diurutkan saat menghasilkan kunci cache. Nilai yang valid:
|
on |
| QueryStringMode |
string |
No |
Mengontrol bagaimana query string digunakan untuk menghasilkan kunci cache. Nilai yang valid:
|
ignore_all |
| QueryString |
string |
No |
Parameter query string untuk disertakan dalam atau dikecualikan dari kunci cache. Pisahkan beberapa parameter dengan spasi. |
example1 example2 |
| IncludeHeader |
string |
No |
Header yang disertakan dalam kunci cache. Baik nama header (tidak peka huruf besar/kecil) maupun nilainya digunakan. Pisahkan beberapa header dengan spasi. Nama header dapat berisi karakter berikut:
|
headername1 headername2 |
| IncludeCookie |
string |
No |
Cookie yang disertakan dalam kunci cache. Baik nama cookie (tidak peka huruf besar/kecil) maupun nilainya digunakan. Pisahkan beberapa cookie dengan spasi. Nama cookie dapat berisi karakter berikut:
|
cookiename1 cookiename2 |
| CacheReserveEligibility |
string |
No |
Mengontrol apakah permintaan melewati node cache reserve selama origin-pull. Nilai yang valid:
|
bypass_cache_reserve |
| CheckPresenceHeader |
string |
No |
Header yang akan diperiksa. Jika header yang ditentukan ada dalam permintaan, namanya (tidak peka huruf besar/kecil) ditambahkan ke kunci cache. Pisahkan beberapa header dengan spasi. Nama header dapat berisi karakter berikut:
|
headername1 headername2 |
| CheckPresenceCookie |
string |
No |
Cookie yang akan diperiksa. Jika cookie yang ditentukan ada dalam permintaan, namanya (tidak peka huruf besar/kecil) ditambahkan ke kunci cache. Pisahkan beberapa cookie dengan spasi. Nama cookie dapat berisi karakter berikut:
|
cookiename1 cookiename2 |
| UserDeviceType |
string |
No |
Mengontrol apakah jenis perangkat klien disertakan dalam kunci cache. Nilai yang valid:
|
on |
| UserGeo |
string |
No |
Mengontrol apakah lokasi geografis klien disertakan dalam kunci cache. Nilai yang valid:
|
on |
| UserLanguage |
string |
No |
Mengontrol apakah bahasa klien disertakan dalam kunci cache. Nilai yang valid:
|
on |
| ServeStale |
string |
No |
Mengontrol apakah konten basi (stale) disajikan. Jika diaktifkan, node edge dapat menyajikan konten kedaluwarsa dari cache-nya jika server asal tidak tersedia. Nilai yang valid:
|
on |
| AdditionalCacheablePorts |
string |
No |
|
8880,2052,2086 |
| CacheDeceptionArmor |
string |
No |
Bertahan terhadap serangan Web Cache Deception dengan hanya meng-cache konten yang divalidasi. Nilai yang valid:
|
on |
| Sequence |
integer |
No |
Prioritas eksekusi aturan. Nilai yang lebih kecil menunjukkan prioritas yang lebih tinggi. |
1 |
| PostCache |
string |
No |
Mengontrol apakah respons terhadap permintaan POST di-cache. |
on |
| PostBodySizeLimit |
string |
No |
Ukuran maksimum body permintaan untuk caching POST, dalam KB. Nilainya harus bilangan bulat dari 1 hingga 8. Jika Anda mengosongkan parameter ini, nilai default 8 KB digunakan. |
1 |
| PostBodyCacheKey |
string |
No |
Mengontrol bagaimana body permintaan digunakan untuk menghasilkan kunci cache untuk permintaan POST. Nilai yang valid:
|
ignore |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Data respons. |
||
| RequestId |
string |
ID permintaan. |
36af3fcc-43d0-441c-86b1-428951dc8225 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | CanNotSetSequence | Non-regular configuration, you cannot set Sequence parameters. | |
| 400 | CacheReserveSiteExceedLimit | The number of binding sites of the cache reserve instance exceeds the limit. The number of binding sites of a single cache reserve instance is limited. Please see the document for the limit. | |
| 400 | CompileRuleError | Rule compilation failed, please check the rule information passed in to ensure that the rule is written according to the syntax described in the document. | |
| 400 | SiteConfigLengthExceedLimit | The overall configuration size of the site exceeds the limit, and the total size of all functional configurations of the site cannot exceed 512K. | |
| 400 | ConfigConflicts | Configuration conflicts, usually when multiple configurations are configured under the same function of the same site, such as duplicate rule names between multiple configurations. | |
| 400 | RuleRegexQuotaCheckFailed | When configuring rules, rules with regular expressions are not allowed in this plan. Please check the relevant documentation of the plan or upgrade the plan. | |
| 400 | NestedRuleQuotaCheckFailed | The nesting level of rules allowed by the plan failed to be verified. Please modify the nesting level of rules or upgrade the plan. | |
| 400 | ServiceInvokeFailed | The call to the internal service failed. The engineer is resolving the problem. Please wait a moment before trying, or contact customer service for details. | |
| 400 | FunctionConflict | The feature configuration conflicts. Sites with version management enabled cannot configure this feature. | |
| 400 | SpecifiedVersionReadOnly | The specified version number is read-only and cannot be modified. | |
| 400 | VersionNotValid | The site does not have version management enabled, or the version number passed in does not exist. | |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | |
| 400 | InvalidParameter.ArgName | Invalid ArgName. Check your website configuration parameters and make sure that they match the supported features and parameter names listed in the official documentation. | |
| 400 | InvalidParameter.ArgValue | Invalid parameter value. Check whether the value format and length meet the requirements. | |
| 400 | InvalidParameter.Configs | Invalid parameter configurations. Check whether your feature configurations are in the valid format and comply with relevant requirements. | |
| 400 | InstanceNotExist | The instance does not exist. Check whether the specified instance ID is correct or whether the instance belongs to your account. | |
| 400 | LockFailed | The system is handling requests you previously submitted. Try again later. | |
| 400 | IllegalOperation.VersionManagement | The version management operation failed because incompatible features or environment settings are configured. Adjust your configurations and try again. | |
| 400 | QuotaCheckFailed.VersionManagement | Insufficient quota for version management. Contact technical support. | |
| 400 | InvalidConfigId | The input configuration ID: ConfigId it does not exist, query the existing configuration and its valid ConfigId through the ListSiteFunction. | |
| 400 | Instance.NotOnline | Your plan is unavailable due to an overdue payment. Complete the payment first. | |
| 400 | FunctionQuotaCheckFailed | The quota verification for this function fails. It may be that the configuration of this function exceeds the limit of the site plan. Please check the plan introduction document corresponding to this site. | |
| 400 | QuotaCheckFailed.FunctionArg | The specified feature parameter is not allowed in your plan, or the feature parameter configurations have reached the upper limit in your plan. | |
| 400 | MissingParameter | The specified ArgName is required for this function. | |
| 400 | FunctionArgError | Failed to check the configured function parameters. | |
| 404 | SiteNotFound | The website does not exist or does not belong to you. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.