slb template cache

Configure the ACOS device to perform transparent Web caching using a RAM cache template. The template can then be applied to a virtual port.

cache Specification

Type Collection
Object Key(s) name
Collection Name cache-list
Collection URI /axapi/v3/slb/template/cache/
Element Name cache
Element URI /axapi/v3/slb/template/cache/{name}
Element Attributes cache_attributes
Schema cache schema

Operations Allowed:

Operation Method URI Payload

Create Object

POST

/axapi/v3/slb/template/cache/

cache Attributes

Create List

POST

/axapi/v3/slb/template/cache/

cache Attributes

Get Object

GET

/axapi/v3/slb/template/cache/{name}

cache Attributes

Get List

GET

/axapi/v3/slb/template/cache/

cache-list

Modify Object

POST

/axapi/v3/slb/template/cache/{name}

cache Attributes

Replace Object

PUT

/axapi/v3/slb/template/cache/{name}

cache Attributes

Replace List

PUT

/axapi/v3/slb/template/cache/

cache-list

Delete Object

DELETE

/axapi/v3/slb/template/cache/{name}

cache Attributes

cache-list

cache-list is JSON List of cache Attributes

cache-list : [

cache Attributes

accept-reload-req

Description: Enable support for the following Cache-Control headers.

  • Cache-Control: no-cache
  • Cache-Control: max-age=0

When support for these headers is enabled, either header causes the ACOS device to reload the cached object from the original server.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

age

Description: Specify how long a cached object can remain in the AX RAM cache without being requested. You can specify a maximum of about 11 1/2 days.

Type: number

Range: 1-999999

Default: 3600

default-policy-nocache

Description: Change the default cache policy in the template from cache to no-cache. This option gives you tighter control over content caching.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

disable-insert-age

Description: Disable insertion of Age headers into cached responses. Insertion of Age headers is enabled by default.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

disable-insert-via

Description: Disable insertion of Via headers into cached responses. Insertion of Via headers is enabled by default.

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

local-uri-policy

Description: local-uri-policy is a JSON List . Please see below for local-uri-policy

Type: List

logging

Description: Logging template to use for external logging of RAM caching events over TCP.

Type: string

Reference Object: /axapi/v3/slb/template/logging

max-cache-size

Description: Specify the size (in MB) of the RAM cache.

Type: number

Range: 1-4096

Default: 80

max-content-size

Description: Specify the maximum object size that can be cached. The ACOS device will not cache objects larger than this size. If you specify 0, no objects can be cached.

Type: number

Range: 0-268435455

Default: 81920

min-content-size

Description: Specify the minimum object size that can be cached. The ACOS device will not cache objects smaller than this size. if you specify 0, all objects smaller than or equal to the maximum content size can be cached.

Type: number

Range: 0-268435455

Default: 512

name

Description: Name of the template.

Type: string

Format: string-rlx

Required: Yes

remove-cookies

Description: Remove cookies from server replies so the replies can be cached. RAM caching does not cache server replies that contain cookies. (Image files are an exception. RAM caching can cache images that have cookies.)

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

replacement-policy

Description: Specify the policy used to make room for new objects when the RAM cache is full. The policy supported in the current release is Least Frequently Used (LFU). When the RAM cache becomes more than 90% full, the ACOS device discards the least-frequently used objects to ensure there is sufficient room for new object.

Type: string

Supported Values: LFU

Default: LFU

sampling-enable

Description: sampling-enable is a JSON List . Please see below for sampling-enable

Type: List

uri-policy

Description: uri-policy is a JSON List . Please see below for uri-policy

Type: List

user-tag

Description: Customized tag

Type: string

Format: string-rlx

uuid

Description: uuid of the object

Type: string

verify-host

Description: Verify request using host before sending response from RAM cache

Type: boolean

Supported Values: true, false, 1, 0

Default: 0

local-uri-policy

Specification
Type list
Block object keys

local-uri

Description: Specify Local URI for caching (Specify URI pattern that the policy should be applied to, maximum 63 charaters)

Type: string

Format: string-rlx

sampling-enable

Specification
Type list
Block object keys

counters1

Description: ‘all’: all; ‘hits’: hits; ‘miss’: miss; ‘bytes_served’: bytes_served; ‘total_req’: total_req; ‘caching_req’: caching_req; ‘nc_req_header’: nc_req_header; ‘nc_res_header’: nc_res_header; ‘rv_success’: rv_success; ‘rv_failure’: rv_failure; ‘ims_request’: ims_request; ‘nm_response’: nm_response; ‘rsp_type_CL’: rsp_type_CL; ‘rsp_type_CE’: rsp_type_CE; ‘rsp_type_304’: rsp_type_304; ‘rsp_type_other’: rsp_type_other; ‘rsp_no_compress’: rsp_no_compress; ‘rsp_gzip’: rsp_gzip; ‘rsp_deflate’: rsp_deflate; ‘rsp_other’: rsp_other; ‘nocache_match’: nocache_match; ‘match’: match; ‘invalidate_match’: invalidate_match; ‘content_toobig’: content_toobig; ‘content_toosmall’: content_toosmall; ‘entry_create_failures’: entry_create_failures; ‘mem_size’: mem_size; ‘entry_num’: entry_num; ‘replaced_entry’: replaced_entry; ‘aging_entry’: aging_entry; ‘cleaned_entry’: cleaned_entry;

Type: string

Supported Values: all, hits, miss, bytes_served, total_req, caching_req, nc_req_header, nc_res_header, rv_success, rv_failure, ims_request, nm_response, rsp_type_CL, rsp_type_CE, rsp_type_304, rsp_type_other, rsp_no_compress, rsp_gzip, rsp_deflate, rsp_other, nocache_match, match, invalidate_match, content_toobig, content_toosmall, entry_create_failures, mem_size, entry_num, replaced_entry, aging_entry, cleaned_entry

uri-policy

Specification
Type list
Block object keys

cache-action

Description: ‘cache’: Specify if certain URIs should be cached; ‘nocache’: Specify if certain URIs should not be cached;

Type: string

Supported Values: cache, nocache

cache-value

Description: Specify seconds that content should be cached, default is age specified in cache template

Type: number

Range: 1-999999

invalidate

Description: Specify if URI should invalidate chache entries matching pattern (pattern that would match entries to be invalidated (64 chars max))

Type: string

uri

Description: Specify URI for cache policy (Specify URI pattern that the policy should be applied to, maximum 63 charaters)

Type: string

Format: string-rlx

stats data

Counter Size Description
nm_response 2 nm_response
rsp_type_304 2 rsp_type_304
rsp_other 2 rsp_other
content_toosmall 2 content_toosmall
entry_create_failures 2 entry_create_failures
nocache_match 2 nocache_match
content_toobig 2 content_toobig
nc_res_header 2 nc_res_header
miss 2 miss
nc_req_header 2 nc_req_header
replaced_entry 8 replaced_entry
aging_entry 8 aging_entry
mem_size 8 mem_size
rsp_deflate 2 rsp_deflate
invalidate_match 2 invalidate_match
match 2 match
cleaned_entry 8 cleaned_entry
entry_num 8 entry_num
total_req 2 total_req
bytes_served 2 bytes_served
rv_success 2 rv_success
rv_failure 2 rv_failure
rsp_gzip 2 rsp_gzip
hits 2 hits
rsp_type_other 2 rsp_type_other
rsp_type_CE 2 rsp_type_CE
rsp_no_compress 2 rsp_no_compress
rsp_type_CL 2 rsp_type_CL
caching_req 2 caching_req
ims_request 2 ims_request