Forum Discussion
Frank_Mancini_3
Nimbostratus
Feb 18, 2009What are the steps to NOT cache a specific file?
Example: /homepage/home.html
What are the steps if I don't want to cache:
1) Just this one page
2) The path /homepage/*
3) Just this one page and all the ...
hoolio
Cirrostratus
Feb 18, 2009You can use HTTP::path to retrieve the requested path (URI minus the query string) and CACHE::disable to selectively disable caching for that request.
when HTTP_REQUEST {
Check if path is just one page (dont_cache.html)
if {[HTTP::path] ends_with "dont_cache.html"}{
Disable caching for this request
CACHE::disable
}
}
You can modify the check to '[HTTP::path] starts_with "/homepage/"'. If the application is not case sensitive, you can set the path to lowercase using [string tolower [HTTP::path]] when making the comparison.
Aaron
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