Forum Discussion
Bijan_141511
Jan 28, 2014Nimbostratus
iRule RAM CACHE odd behaviour
Hi,
I am trying to cache and serve some content from the static contents of my .Net app. I have enabled the Cache on the HTTP profile, and applied the following rule to my Virtual Server:-
when HTT...
Scott_Hopkins
Jan 30, 2014Nimbostratus
Quick thought... you're using HTTP::uri, not HTTP::path. The URI could have other data (query strings, etc...) at the end, which could be messing with the ends_with setting. We usually do something more like (where 'static_content' is a data group of extensions we want cached):
set VsRAMCacheState [PROFILE::http ramcache]
set content_extension [string range [HTTP::path] [string last . [HTTP::path]] end]
if { $VsRAMCacheState == 1 } {
CACHE::disable
if { [ class match $content_extension equals static_content ] }{
enable
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects