Upon receiving any type A or AAAA DNS responses, the DNS cache function will cache the A or AAAA records. When the system receives any DNS queries for the cached A or AAAA records, the system will return the type A or AAAA DNS responses directly. If the DNS queries match no cached record, the system will forward the queries to the remote DNS server(s). In addition, the administrator can add static DNS entries to the DNS cache.
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | enable | boolean | |
| default | expire_min | int | Sets the minimum period of time that the cached "A" or "AAAA" records will be valid. |
| default | expire_max | int | Sets the maximum period of time that the cached A or AAAA records will be valid. If the Time To Live (TTL) of the received DNS response is shorter than the minimum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the minimum DNS cache expiration time ends. If the TTL of the DNS response is longer than the maximum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the maximum DNS cache expiration time ends. If the TTL of the DNS response is between the minimum and maximum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the TTL ends. |
| default | host | asso | |
| stats | statistics | clitext | |
| dns_stats | num | StorableField | |
| dns_stats | hits | StorableField |
{
"DNSCahceSettings": {
"meta": {
"abstract": false,
"verbose_name": DNS Cache Settings,
},
"fieldgroups": [
{
"fields": [
{
"verbose_name": field_verbose_name1,
"field_name": field_name1
},
...
],
"group_name": field_group_name1
},
...
]
}
}
| Parameter | Type | Description |
|---|---|---|
| field_group_name | URI | (optional) Target field group name to query. Available names are: default, stats, dns_stats, Notice: There could only be one field_group_name or field_name in the URL. And if both field_group_name and field_name are not specified, will try to query default field_group data. |
| field_name | URI | (optional) Target field name to query. Available names are: enable, expire_min, expire_max, host, statistics, num, hits, Notice: There could only be one field_group_name or field_name in the URL. |
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| default | enable | boolean | |
| default | expire_min | int | Sets the minimum period of time that the cached "A" or "AAAA" records will be valid. |
| default | expire_max | int | Sets the maximum period of time that the cached A or AAAA records will be valid. If the Time To Live (TTL) of the received DNS response is shorter than the minimum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the minimum DNS cache expiration time ends. If the TTL of the DNS response is longer than the maximum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the maximum DNS cache expiration time ends. If the TTL of the DNS response is between the minimum and maximum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the TTL ends. |
| default | host | asso | |
| stats | statistics | clitext | |
| dns_stats | num | StorableField | |
| dns_stats | hits | StorableField |
{
"DNSCahceSettings": {
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field_group name is provided:
{
"DNSCahceSettings": {
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"DNSCahceSettings": {
<field>:<value>,
}
}
{
<field_name>:<value>
}
When field name is specified in URL:
Notice: The fields not provided are left untouched.
{
<field_name1>:<value1>,
<field_name2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| field_name | URI | (optional) Target field name to update. Available field names are: enable, expire_min, expire_max, host, statistics, num, hits, |
| Field Name | Type | Description |
|---|---|---|
| enable | boolean | |
| expire_min | int | Sets the minimum period of time that the cached "A" or "AAAA" records will be valid. |
| expire_max | int | Sets the maximum period of time that the cached A or AAAA records will be valid. If the Time To Live (TTL) of the received DNS response is shorter than the minimum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the minimum DNS cache expiration time ends. If the TTL of the DNS response is longer than the maximum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the maximum DNS cache expiration time ends. If the TTL of the DNS response is between the minimum and maximum DNS cache expiration time, the DNS cache will expire the cached A or AAAA record after the TTL ends. |
All configuration fields and their values are replied:
{
"DNSCahceSettings": {
<field1>:<value1>,
<field2>:<value2>,
...
<field_group1>: {
<field3>:<value3>,
<field4>:<value4>,
...
},
<field_group2>: {
<field5>:<value5>,
<field6>:<value6>,
...
},
...
}
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"DNSCahceSettings": {
"instance_id":<instance_id>,
"host":[
{
<field1>:<value1>,
<field2>:<value2>,
...
}
]
}
}
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| hostname | string | |
| ip | ipaddr |
{
"DNSCacheHostEntry": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
{
"msg": <success-or-error-msg>
}