ADC NITRO APIs

cache

Statistics for cache.

Properties

(click to see Operations )

Name Data Type Permissions Description
clearstats Read-write Clear the statsistics / counters.

Possible values = basic, full
cachemaxmemorykb Read-only Largest amount of memory the Citrix ADC can dedicate to caching, up to 50% of available memory. A 0 value disables caching, but the caching module continues to run.
cacherecentpercentsuccessfulrevalidation Read-only Recently recorded percentage of times stored content was successfully revalidated by a 304 response rather than by a full response
cacherecentpercentstoreablemiss Read-only Recently recorded ratio of store-able misses to all misses expressed as percentage.
cacherecentpercentparameterizedhits Read-only Recently recorded ratio of parameterized 304 hits to all parameterized hits expressed as a percentage
cacherecentpercentoriginbandwidthsaved Read-only Bytes served from cache divided by total bytes served to client. This ratio can be greater than 1 because of the assumption that all compression has been done in the Citrix ADC.
cacherecentpercenthit Read-only Recently recorded cache hit ratio expressed as percentage
cacherecentpercentbytehit Read-only Recently recorded cache byte hit ratio expressed as percentage. Here we define byte hit ratio as ((number of bytes served from the cache)/(total number of bytes served to the client)). This is the standard definition of Byte Hit Ratio. If compression is turned ON in NS then this ratio doesn’t mean much. This might under or over estimate the origin-to-cache bandwidth saving (depending upon whether bytes served by CMP in Citrix ADC are more or less than compressed bytes served from the cache). If CMP is turned OFF in NS then this ratio is same as cacheRecentPercentOriginBandwidthSaved.
cacherecentpercent304hits Read-only Recently recorded ratio of 304 hits to all hits expressed as percentage
cacheutilizedmemorykb Read-only Amount of memory the integrated cache is currently using.
cachemaxmemoryactivekb Read-only Currently active value of maximum memory
cache64maxmemorykb Read-only Largest amount of memory the Citrix ADC can dedicate to caching, up to 50% of available memory. A 0 value disables caching, but the caching module continues to run.
cachepercentpethits Read-only Percentage of cache hits in content groups that have Poll Every Time enabled, relative to all searches of content groups with Poll Every Time enabled.
cachetotpethits Read-only Number of times a cache hit was found during a search of a content group that has Poll Every Time enabled.
cachepethitsrate Read-only Rate (/s) counter for cachetotpethits
cachepercentparameterized304hits Read-only Percentage of parameterized 304 hits relative to all parameterized hits.
cachetotparameterizedhits Read-only Parameterized requests resulting in either a 304 or non-304 hit.
cacheparameterizedhitsrate Read-only Rate (/s) counter for cachetotparameterizedhits
cachepercentsuccessfulrevalidation Read-only Percentage of times stored content was successfully revalidated by a 304 (Object Not Modifed) response rather than by a full response
cachepercentstoreablemiss Read-only Responses that were fetched from the origin, stored in the cache, and then served to the client, as a percentage of all cache misses.
cachetotfulltoconditionalrequest Read-only Number of user-agent requests for a cached Poll Every Time (PET) response that were sent to the origin server as conditional requests.
cachefulltoconditionalrequestrate Read-only Rate (/s) counter for cachetotfulltoconditionalrequest
cachetotsuccessfulrevalidation Read-only Total number of times stored content was successfully revalidated by a 304 Not Modified response from the origin.
cachesuccessfulrevalidationrate Read-only Rate (/s) counter for cachetotsuccessfulrevalidation
cachetotrevalidationmiss Read-only Responses that an intervening cache revalidated with the integrated cache before serving, as determined by a Cache-Control: Max-Age header configurable in the integrated cache
cacherevalidationmissrate Read-only Rate (/s) counter for cachetotrevalidationmiss
cachetotnonstoreablemisses Read-only Cache misses for which the fetched response is not stored in the cache. These responses match policies with a NOCACHE action or are affected by Poll Every Time.
cachenonstoreablemissesrate Read-only Rate (/s) counter for cachetotnonstoreablemisses
cachetotstoreablemisses Read-only Cache misses for which the fetched response is stored in the cache before serving it to the client. Storable misses conform to a built-in or user-defined caching policy that contains a CACHE action.
cachestoreablemissesrate Read-only Rate (/s) counter for cachetotstoreablemisses
cachecompressedbytesserved Read-only Number of compressed bytes served from the cache
cachecompressedbytesservedrate Read-only Rate (/s) counter for cachecompressedbytesserved
cachepercentbytehit Read-only Bytes served from the cache divided by total bytes served to the client. If compression is On in the Citrix ADC, this ratio may not reflect the bytes served by the compression module. If the compression is Off, this ratio is the same as cachePercentOriginBandwidthSaved.
cachebytesserved Read-only Total number of bytes served from the integrated cache
cachebytesservedrate Read-only Rate (/s) counter for cachebytesserved
cachetotresponsebytes Read-only Total number of HTTP response bytes served by Citrix ADC from both the origin and the cache
cacheresponsebytesrate Read-only Rate (/s) counter for cachetotresponsebytes
cachepercent304hits Read-only 304 responses as a percentage of all responses that the Citrix ADC served.
cachenummarker Read-only Marker objects created when a response exceeds the maximum or minimum size for entries in its content group or has not yet received the minimum number of hits required for items in its content group.
cachepercentoriginbandwidthsaved Read-only Percentage of origin bandwidth saved, expressed as number of bytes served from the integrated cache divided by all bytes served. The assumption is that all compression is done in the Citrix ADC.
cachepercenthit Read-only Cache hits as percentage of the total number of requests
cachetotmisses Read-only Intercepted HTTP requests requiring fetches from origin server.
cachemissesrate Read-only Rate (/s) counter for cachetotmisses
cachetothits Read-only Responses served from the integrated cache. These responses match a policy with a CACHE action.
cachehitsrate Read-only Rate (/s) counter for cachetothits
cachetotrequests Read-only Total cache hits plus total cache misses.
cacherequestsrate Read-only Rate (/s) counter for cachetotrequests
cachenumcached Read-only Responses currently in integrated cache. Includes responses fully downloaded, in the process of being downloaded, and expired or flushed but not yet removed.
cachecurhits Read-only This number should be close to the number of hits being served currently.
cachecurmisses Read-only Responses fetched from the origin and served from the cache. Should approximate storable misses. Does not include non-storable misses.
cachetotnon304hits Read-only Total number of full (non-304) responses served from the cache. A 304 status code indicates that a response has not been modified since the last time it was served
cachenon304hitsrate Read-only Rate (/s) counter for cachetotnon304hits
cachetot304hits Read-only Object not modified responses served from the cache. (Status code 304 served instead of the full response.)
cache304hitsrate Read-only Rate (/s) counter for cachetot304hits
cachetotsqlhits Read-only sql response served from cache
cachesqlhitsrate Read-only Rate (/s) counter for cachetotsqlhits
cachetotexpireatlastbyte Read-only Instances of content expiring immediately after receiving the last body byte due to the Expire at Last Byte setting for the content group.
cacheexpireatlastbyterate Read-only Rate (/s) counter for cachetotexpireatlastbyte
cachetotflashcachemisses Read-only Number of requests to a content group with flash cache enabled that were cache misses. Flash cache distributes the response to all the clients in aqueue.
cacheflashcachemissesrate Read-only Rate (/s) counter for cachetotflashcachemisses
cachetotflashcachehits Read-only Number of requests to a content group with flash cache enabled that were cache hits. The flash cache setting queues requests that arrive simultaneously and distributes the response to all the clients in the queue.
cacheflashcachehitsrate Read-only Rate (/s) counter for cachetotflashcachehits
cachetotparameterizedinvalidationrequests Read-only Requests matching a policy with an invalidation (INVAL) action and a content group that uses an invalidation selector or parameters.
cacheparameterizedinvalidationrequestsrate Read-only Rate (/s) counter for cachetotparameterizedinvalidationrequests
cachetotnonparameterizedinvalidationrequests Read-only Requests that match an invalidation policy where the invalGroups parameter is configured and expires one or more content groups.
cachenonparameterizedinvalidationrequestsrate Read-only Rate (/s) counter for cachetotnonparameterizedinvalidationrequests
cachetotinvalidationrequests Read-only Requests that match an invalidation policy and result in expiration of specific cached responses or entire content groups.
cacheinvalidationrequestsrate Read-only Rate (/s) counter for cachetotinvalidationrequests
cachetotparameterizedrequests Read-only Total number of requests where the content group has hit and invalidation parameters or selectors.
cacheparameterizedrequestsrate Read-only Rate (/s) counter for cachetotparameterizedrequests
cachetotparameterizednon304hits Read-only Parameterized requests resulting in a full response (not status code 304: Object Not Updated) served from the cache.
cacheparameterizednon304hitsrate Read-only Rate (/s) counter for cachetotparameterizednon304hits
cachetotparameterized304hits Read-only Parameterized requests resulting in an object not modified (status code 304) response.
cacheparameterized304hitsrate Read-only Rate (/s) counter for cachetotparameterized304hits
cachetotpetrequests Read-only Requests that triggered a search of a content group that has Poll Every Time (PET) enabled (always consult the origin server before serving cached data).
cachepetrequestsrate Read-only Rate (/s) counter for cachetotpetrequests
cacheerrmemalloc Read-only Total number of times the cache failed to allocate memory to store responses.
cachelargestresponsereceived Read-only Size, in bytes, of largest response sent to client from the cache or the origin server.

Operations

(click to see Properties )

  • GET (ALL)

Some options that you can use for each operations:

  • Getting warnings in response: NITRO allows you to get warnings in an operation by specifying the 'warning' query parameter as 'yes'. For example, to get warnings while connecting to the NetScaler appliance, the URL is as follows:

    http:// <netscaler-ip-address> /nitro/v1/config/login?warning=yes

    If any, the warnings are displayed in the response payload with the HTTP code '209 X-NITRO-WARNING'.

  • Authenticated access for individual NITRO operations: NITRO allows you to logon to the NetScaler appliance to perform individual operations. You can use this option instead of creating a NITRO session (using the login object) and then using that session to perform all operations,

    To do this, you must specify the username and password in the request header of the NITRO request as follows:

    X-NITRO-USER: <username>

    X-NITRO-PASS: <password>

    Note: In such cases, make sure that the request header DOES not include the following:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

*Note: * Mandatory parameters are marked in red and placeholder content is marked in green

get (all)

URL: http:// <netscaler-ip-address> /nitro/v1/stat/cache Query-parameters: args http:// <netscaler-ip-address> /nitro/v1/stat/cache? args=detail: <Boolean_value> ,fullvalues: <Boolean_value> ,ntimes: <Double_value> ,logfile: <String_value> ,clearstats: <String_value>

Use this query-parameter to get cache resources based on additional properties.

attrs http:// <netscaler-ip-address> /nitro/v1/stat/cache? attrs=property-name1,property-name2

Use this query parameter to specify the resource details that you want to retrieve.

HTTP Method: GET

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Accept:application/json

Response: HTTP Status Code on Success: 200 OK

HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

Response Header:

Content-Type:application/json

Response Payload:

{  "cache": [ {
"cachehitsrate":<Double_value>,
"cachepethitsrate":<Double_value>,
"cachetotexpireatlastbyte":<Double_value>,
"cachenummarker":<Double_value>,
"cachecurhits":<Double_value>,
"cacheresponsebytesrate":<Double_value>,
"cacheutilizedmemorykb":<Double_value>,
"cachetotnonparameterizedinvalidationrequests":<Double_value>,
"cachepercentpethits":<Double_value>,
"cachebytesserved":<Double_value>,
"cachetotparameterizednon304hits":<Double_value>,
"cachebytesservedrate":<Double_value>,
"cachepercent304hits":<Double_value>,
"cachepercentbytehit":<Double_value>,
"cachepercentstoreablemiss":<Double_value>,
"cachetotpetrequests":<Double_value>,
"cachecompressedbytesserved":<Double_value>,
"cachetotresponsebytes":<Double_value>,
"cachelargestresponsereceived":<Double_value>,
"cachenonparameterizedinvalidationrequestsrate":<Double_value>,
"cacherecentpercentbytehit":<Double_value>,
"cacherecentpercentsuccessfulrevalidation":<Double_value>,
"cachesuccessfulrevalidationrate":<Double_value>,
"cachesqlhitsrate":<Double_value>,
"cacherequestsrate":<Double_value>,
"cachemissesrate":<Double_value>,
"cachemaxmemorykb":<Double_value>,
"cachenumcached":<Double_value>,
"cachetothits":<Double_value>,
"cachetotsuccessfulrevalidation":<Double_value>,
"cachepercentparameterized304hits":<Double_value>,
"cacheflashcachehitsrate":<Double_value>,
"cachestoreablemissesrate":<Double_value>,
"cachetotflashcachehits":<Double_value>,
"cachetotsqlhits":<Double_value>,
"cachetotrevalidationmiss":<Double_value>,
"cachemaxmemoryactivekb":<Double_value>,
"cachetotstoreablemisses":<Double_value>,
"cacheparameterizedhitsrate":<Double_value>,
"cacheparameterized304hitsrate":<Double_value>,
"cacheexpireatlastbyterate":<Double_value>,
"cachecurmisses":<Double_value>,
"cacherevalidationmissrate":<Double_value>,
"cachenon304hitsrate":<Double_value>,
"cachepercentsuccessfulrevalidation":<Double_value>,
"cachetotnon304hits":<Double_value>,
"cachefulltoconditionalrequestrate":<Double_value>,
"cacherecentpercentoriginbandwidthsaved":<Double_value>,
"cacherecentpercentparameterizedhits":<Double_value>,
"cachetotparameterizedinvalidationrequests":<Double_value>,
"cachetotflashcachemisses":<Double_value>,
"cacheparameterizedrequestsrate":<Double_value>,
"cacheerrmemalloc":<Double_value>,
"cacherecentpercenthit":<Double_value>,
"cachecompressedbytesservedrate":<Double_value>,
"cache304hitsrate":<Double_value>,
"cachepercenthit":<Double_value>,
"cachenonstoreablemissesrate":<Double_value>,
"cachetotinvalidationrequests":<Double_value>,
"cache64maxmemorykb":<Double_value>,
"cachetot304hits":<Double_value>,
"cachetotfulltoconditionalrequest":<Double_value>,
"cachetotparameterizedhits":<Double_value>,
"cachepetrequestsrate":<Double_value>,
"cacherecentpercent304hits":<Double_value>,
"cachetotnonstoreablemisses":<Double_value>,
"cachetotparameterizedrequests":<Double_value>,
"cachepercentoriginbandwidthsaved":<Double_value>,
"cachetotrequests":<Double_value>,
"cacheparameterizednon304hitsrate":<Double_value>,
"cachetotmisses":<Double_value>,
"cachetotpethits":<Double_value>,
"cacheparameterizedinvalidationrequestsrate":<Double_value>,
"cacherecentpercentstoreablemiss":<Double_value>,
"cacheflashcachemissesrate":<Double_value>,
"cacheinvalidationrequestsrate":<Double_value>,
"cachetotparameterized304hits":<Double_value>
}]}

<!--NeedCopy-->
cache