ltm rule command CACHE traceΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



CACHE::trace
       Dump the list of cached objects for a HTTP profile where RAM Cache is
       enabled.

SYNOPSIS
       CACHE::trace (MAX)?

DESCRIPTION
       Dump the list of cached objects for a HTTP profile where RAM Cache is
       enabled.  This event will execute only if a RAM Cache profile is
       enabled on the Virtual Server, and for objects that match the RAM Cache
       configuration.  The list will represent the size of the cache (Cache
       Size), number of objects (Cache Count), and starting by the term
       Entity, it will list every object:
	 * Pos (0001), list the position of the object in the cache
	 * Local Hits (00031/00007) indicate the number of Local Hits
	 * Remote Hits (00031/00007) indicate the number of Remote Hits
	 * Served (000) list the number of times the object was served from
	   the cache
	 * Age (1931), indicate the aging of the object in the cache
	 * Score (0124), indicate the scoring of the object
	 * Key - 'www.mystestsite.fr/f5-logo.gif' list the name of the object

       Syntax CACHE::trace

RETURN VALUE
VALID DURING
       CACHE_REQUEST, CACHE_RESPONSE

EXAMPLES
	when RULE_INIT {
	    set static::cache ""
	}
	when HTTP_REQUEST {
	    if { [HTTP::uri] ends_with "/cache" } {
		HTTP::respond 200 content "CACHE DUMP\r\n\r\n$static::cache\r\n\r\n"
	    }
	}

	when CACHE_RESPONSE {
	    CACHE::header insert X-Via F5-LB
	    set static::cache [CACHE::trace]
	}

	Page Returned (in TEXT format):

	 CACHE DUMP

	 Cache size		- 1414
	 Cache count		- 1
	Entity - Pos (0001) Local Hits (00000/00000) Remote Hits (00000/00000) Served (005) Age (005) Score (0000) Key - '10.100.30.111/templates/divers/icone.gif'

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.0.3 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)