Forum Discussion
Hendel
Jan 31, 2023Nimbostratus
Insert header when item added to ramcache
Haven't been in here for a looong time... :-7 Trying to store a header value received from pool member in a new header as that item is added to the ramcache (so it'll be present when that item is su...
Hendel
Nimbostratus
There aren't any other rules or policies. I'd tried both insert and replace, but the logging in CACHE_RESPONSE never showed any effect from either of the UPDATE commands.
when CACHE_UPDATE {
CACHE::header insert X-LTM-Cached $cache
# CACHE::header replace Cache-Control $cache
}
when CACHE_RESPONSE {
log local0. "[IP::client_addr] path:$path cache:$cache [CACHE::headers]"
}
when HTTP_REQUEST {
set path [string tolower [HTTP::path]]
if { !($path ends_with ".js") } {
CACHE::disable
} else {
HTTP::uri [HTTP::path]
CACHE::enable
}
}
when HTTP_RESPONSE {
set cache [HTTP::header value Cache-Control]
HTTP::header replace Cache-Control public
}
JRahm
Feb 07, 2023Admin
I updated the formatting to make it a little easier to read through...let me reach out internally to see if anyone has worked with the cache commands before, I'm not quite sure what the flow should be here.
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