Forum Discussion
Wil_Schultz_101
Nimbostratus
Oct 09, 2007irule doesn't work after upgrade...
Hey there, I have the following irule located in the cache example:
http://devcentral.f5.com/wiki/default.aspx/iRules/UsingIRulesToManipulateCache.html
when HTTP_REQUEST {
set ::mytime [clock seconds]
}
when HTTP_RESPONSE {
HTTP::header insert Last-Modified "[clock format $::mytime -format "%a, %d %b %Y %T %Z"]"
HTTP::header insert Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
HTTP::header insert Cache-Control "post-check=0, pre-check=0, false"
HTTP::header insert Pragma "no-cache"
}
I wrote the example wiki page and this rule seemed to work great in version 9.2.4.
I have some tickets opened with f5 support on some other issues and was asked to update the code to 9.3.0 HF2.
This irule still works, however somewhere along the way it appears as if this irule now prevents my pages from caching. I know for a fact that using this irule worked for me in the past (added headers, forced client browsers to refresh, and grab the current cached version of the page), but I can now prove that this indeed prevents all pages that these headers were inserted into do not make it to cache. All requests are currently hitting the origin servers.
Anyone here have any suggestions? or maybe some information on why this doesn't appear to have the same effect anymore?
- The_Bhattman
Nimbostratus
Aren't you not cacheing because you already using HTTP::header insert Pragma "no-cache"?. - Wil_Schultz_101
Nimbostratus
I should have updated a while ago.when HTTP_REQUEST { set ::mytime [clock seconds] } when HTTP_RESPONSE { HTTP::header insert Last-Modified "[clock format $::mytime -format "%a, %d %b %Y %T %Z"]" HTTP::header insert Cache-Control "no-store, no-cache, must-revalidate, max-age=0" HTTP::header insert Cache-Control "post-check=0, pre-check=0, false" HTTP::header insert Pragma "no-cache" HTTP::header insert Pragma "dont cache me please" }
- The_Bhattman
Nimbostratus
Nice. Thank you for the follow-up. - hoolio
Cirrostratus
A minor suggestion, wschultz:
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