Forum Discussion
Webacceleration profile not caching
Hi Marvin!
I've seen this before and the answer is usually to use iRules. If I don't remember wrongly the F5 does not cache certain items unless you specifically asks it to.
Try this simple iRule and replace cacheditem.aspx with whatever selector you want.
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri equals "/cacheditem.aspx" } {
CACHE::enable
CACHE::uri $uri
}
}
when CACHE_RESPONSE {
CACHE::header insert X-CacheStatus "Hit"
CACHE::header insert X-CacheAge [CACHE::age]
}
With this rule you can see if your request has been cached in the response headers. You can also use starts_with instead of equals. Take care though so you don't cache something you did not want to cache.
One more advise is to use a small cache size to begin with as the F5's memory allocation does not seem to be included in the cache size. This means that if you allocate too small objects and too many of them you could potentially run out of memory. Saw this once on our Viprions.
Hope this helps!
/Patrik
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com