QueryCacheTime

Update time: 2026-08-14 11:17:18

Applicable Products

Media Acceleration VoD,Media Acceleration Live Broadcast,Content Acceleration,Dynamic Web Acceleration

API Description

Self-service query of node cache configuration configuration through the interface. The * of the interface calling url can be the domain name or domain id.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Path Params

NameDescription
*domain-nameString
Domain name or domain name id to query configuration

Response parameter(s)

Body Params

NameDescription
domain-nameString
Domain name or domain name id to query configuration
domain-idString
Domain name or domain name id to query configuration
cache-time-behaviorsList
file-typeString
File Type: Specify the file type for cache settings. File types include: gif png bmp jpeg jpg html htm shtml mp3 wma flv mp4 wmv zip exe rar css txt ico js swf If you need all types, pass all directly. Multiples are separated by semicolons, and all and specific file types cannot be configured at the same time.
ignore-cache-controlString
Ignore the source station does not cache the header. The optional values are true and false, which are used to ignore the two configurations of cache-control in the request header (private, no-cache) and the Authorization set by the client. The ture indicates that the source station's settings for the three are ignored. Enables resources to be cached on the service node in the form of cache-control: public, and then our nodes can cache this type of resource and provide acceleration services. False means that when the source station sets cache-control: private, cache-control: no-cache for a resource or specifies to cache according to authorization, our service node will not cache such files.
custom-file-typeString
Custom file type: Fill in the appropriate identifiable file type according to your needs outside of the specified file type. Can be used with file-type. If the file-type is also configured, the actual file type is the sum of the two parameters.
is-respect-serverString
Respect the server: Accelerate whether to prioritize the source cache time. Optional values: true and false True: indicates that the server is time-first False: The cache time of the CDN configuration takes precedence.
ignore-authentication-headerBoolean
You can set it 'true' to cache ignoring the http header 'Authentication'. If it is empty, the header is not ignored by default.
ignore-letter-caseString
Ignore case, the optional value is true or false, true means to ignore case; false means not to ignore case; When adding a new configuration item, the default is not true.
exception-uaString
Exceptional UA
path-patternString
The url matching mode supports fuzzy regularization. If all matches, the input parameters can be configured as:
custom-patternString
Specify common types: Select the domain name that requires the cache to be all files or the home page. : E.g: All: all files Homepage: homepage
priorityInteger
Indicates the priority execution order of multiple sets of redirected content by the customer. The higher the number, the higher the priority. When adding a new configuration item, the default is 10
uaString
UA
directoryString
Directory: Specify the directory cache. Enter a legal directory format. Multiple separated by semicolons
cache-ttlInteger
Cache time: set the time corresponding to the cache object Input format: integer plus unit, such as 20s, 30m, 1h, 2d, no cache is set to 0. Do not enter the unit default is seconds There is no upper limit on the cache time theory. This time is set according to the customer's own needs. If the customer feels that some of the files are not changed frequently, then the setting is longer. For example, the text class js, css, html, etc. can be set shorter, the picture, video and audio classes can be set longer (because the cache time will be replaced by the new file due to the file heat algorithm, the longest suggestion Do not exceed one month)
reload-manageString
Reload processing rules, optional: ignore or if-modified-since If-modified-since: indicates that you want to convert to if-modified-since Ignore: means to ignore client refresh
specify-url-patternString
Specify URL cache: Specify url according to requirements for cache INS format does not support URI format with http(s)://
data-idInteger
Add a grid type identifier to indicate a specific group configuration when the client has multiple groups of configurations.
except-path-patternString
Exceptional url matching mode, except for some URLs: such as abc.jpg, do not do anti-theft chain function E.g: ^https?://[^/]+/.*\.m3u8
uri-match-patternString
Specify URI match pattern. E.g: exact: exact match parameter-ignoring: parameter ignoring match

Error code

Error code(code)Description(message)HTTP statusSemantic
InvalidParameterNo domain name was specified.400No domain name was specified.
NoSuchDomainThe specified domain does not exist.404The specified domain does not exist.
CustomerNoOwnDomaincustomer not own domain name[{your customer code}]400customer not own domain name[{your customer code}]

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://{@apiDomain}/api/config/cachetime/123344" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json"
Response example
Copy Copy success
HTTP/1.1 200 OK
Server: openresty/1.11.2.2
Date: Fri, 24 May 2019 08:31:27 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 1013
Connection: keep-alive
App-Name: service_confApi
x-cnc-request-id: b0c0d85f-aa60-44dd
{
    "domain-id":"3791876",
    "domain-name":"www.livestream.1558074757857625.com",
"cache-time-behaviors": [
    {
      "data-id":"1",
      "path-pattern": ".*",
      "cache-ttl": "30s",
           "ignore-cache-control": "true",
      "is-respect-server": "flase",
           "ignore-letter-case": "true",
           "reload-manage": "ignore",
      "priority": "10",
      "ua": "Mobile",
      "exception-ua": "ie|edge"
    },
    {
           "data-id":"2",
      "path-pattern": ".*",
      "cache-ttl": "30s",
           "ignore-cache-control": "flase",
      "is-respect-server": "true",
           "ignore-letter-case": "true",
           "reload-manage": "if-modified-since",
      "priority": "10"
    }
  ]
}