Ns cache stats

From AOLserver Wiki
Revision as of 02:20, 27 October 2009 by Akhassin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NAME

ns_cache_stats − Returns statistics (since creation) for a cache

SYNOPSIS

ns_cache_stats cachename ?arrayName?

DESCRIPTION

If arrayName is ommitted, returns a string of the following format:
entries: %d flushed: %d hits: %d misses: %d hitrate: %d
If arrayName is provided, this command sets the above keys in the specified array and returns nothing.
The data elements are:
  • entries is the total number of entries currently in the cache (including expired and in-progress ones)
  • flushed is the total number of successful flushes (i.e. when the key was found)
  • hits is the total number of times a key was found to exist whenever the key was accessed whether it was being read or set
  • misses is the total number of times a key was not found whenever it was accessed whether it was being read or set
  • hitrate is the percent value of hits to hits+misses
Note that because of how it is implemented, a single ns_cache eval operation when a key does not exist will result in both a miss and a hit.

SEE ALSO

ns_cache

Category Documentation - Category Core Tcl API