Forum Discussion
Hendel
Nimbostratus
I'm able to log CACHE::headers when I retrieve objects from the cache, it's just that they only come out with all of their original headers/values as sent by the pool member, not the ones I was trying to insert and/or modify as they went in to the cache.
John_Alam
Feb 08, 2023Employee
i used this version and was able to change the headers Cache-Control. I was also able to insert headers. No dynamic values though.
when CACHE_UPDATE {
CACHE::header insert X-LTM-Cached "test"
CACHE::header replace Cache-Control "private"
log local0. "Cache update- path:$path cache: [CACHE::headers]"
}
But you have to invalidate the cache before every expected change of behavior. You do that from the CLI with this command:
tmsh delete /ltm profile ramcache optimized-caching
and reload page twice. First reload will not have the cached version.
HTH