Forum Discussion
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.