ltm rule command CACHE headerΒΆ

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



CACHE::header
       Get/modify the content of an header related to an object stored in the
       RAM Cache.

SYNOPSIS
       CACHE::header ('exists' | 'remove' | 'value') HEADER_NAME

       CACHE::header ('insert' | 'replace') HEADER_NAME HEADER_VALUE

DESCRIPTION
       The command is used to gather or modify the content of a header stored
       in the cache.

       CACHE::header 

	    * Get the content of the requested header

       CACHE::header insert  

	    * Add the header with the specified value to the list of headers sent to the
	      client when delivering an object from the cache.

       CACHE::header remove 

	    * Remove the header with the specified name.

       CACHE::header replace  

	    * Replace the header with the specified value.

       CACHE::header value 

	    * Return the header value for the specified header name.

RETURN VALUE
VALID DURING
       CACHE_RESPONSE, CACHE_UPDATE

EXAMPLES
	when CACHE_RESPONSE {
	    # response being sent to the client - the object in the cache is not accessed/modified
	    # modifications will be seen only in the current response
	    CACHE::header insert X-Via F5-Local-Cache
	    CACHE::header replace Server Big-IP-Server
	}


	when CACHE_UPDATE {
	    # cached object's headers manipulation
	    # modifications will be seen whenever the object is served from cache
	    CACHE::header replace Server Big-IP-Server
	}

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



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