Version notice:
CACHE_REQUEST¶
Description¶
Triggered when the system receives a request for an object eligible to
be cached. Used to override default behavior.
Examples¶
when CACHE_REQUEST {
if { [CACHE::age] > 60 } {
CACHE::expire
log local0. "Expiring content: Age > 60 seconds"
}
}
Related Information¶
Available Commands:
- CACHE::trace - Dump the list of cached objects for a HTTP profile where RAM cache is enabled.
- clone - Causes the system to clone traffic to the specified pool or pool member regardless of monitor status.
- forward - Sets the connection to forward IP packets.
- HTTP::close - Closes the HTTP connection.
- HTTP::collect - Collects an amount of HTTP body data that you specify.
- HTTP::cookie - Queries for or manipulates cookies in HTTP requests and responses.
- HTTP::fallback - Specifies or overrides a fallback host specified in the HTTP profile.
- HTTP::header - Queries or modifies HTTP headers.
- HTTP::host - Returns the value of the HTTP Host header
- HTTP::is_keepalive - Returns a true value if this is a Keep-Alive connection.
- HTTP::is_redirect - Returns a true value if the response is a redirect.
- HTTP::password - Returns the password part of HTTP basic authentication.
- HTTP::payload - Queries for or manipulates HTTP payload information.
- HTTP::redirect - Redirects an HTTP request or response to the specified URL.
- HTTP::request_num - Returns the number of HTTP requests that a client made on the connection.
- HTTP::uri - Returns or sets the URI part of the HTTP request.
- HTTP::username - Returns the username part of HTTP basic authentication.
- HTTP::version - Returns or sets the HTTP version of the request or response.
- imid - Returns an i-mode identifier string.
- IP::idle_timeout - Returns or sets the idle timeout value.
- ip_ttl - Returns the TTL of the latest IP packet received.
- lasthop - Sets the lasthop of an IP connection.
- listen - Sets up a related ephemeral listener to allow an incoming related connection to be established.
- LSN::address - Set or override translation address.
- LSN::disable - Disable LSN translation.
- LSN::inbound - Disable inbound connections to translation address/port.
- LSN::persistence - Set translation selection mode and persistence timeout.
- LSN::persistence-entry - Create or lookup translation address.
- LSN::pool - Specify LSN pool for current connection.
- LSN::port - Set or override translation port.
- nexthop - Sets the nexthop of an IP connection.
- node - Sends the packet directly to the identified server node.
- peer - Causes the specified iRule commands to be evaluated under the peer’s (opposite) context.
- persist - Causes the system to use the named persistence type to persist the connection.
- session - Utilizes the persistence table to store arbitrary information based on the same keys as persistence.
- SSL::cert - Returns X509 SSL certificate data.
Warning
The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.
Sample Code:
- Introduced: BIGIP-9.0.3
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.