Forum Discussion
Insert header when item added to ramcache
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.
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
Recent Discussions
Related Content
* 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