Forum Discussion
Leo
Nimbostratus
Jun 27, 2013Clearing machine cache
Hello all,
Today we are using a TMSH command to clear the machines cache by running:
delete ltm profile ramcache http-wan-optimized-compression-caching-cache
I want to be able t...
spark_86682
Jun 27, 2013Historic F5 Account
There isn't directly, no. However, you can do something clever with CACHE_REQUEST, CACHE::age, and CACHE::expire. I can't code this up for you, but will describe how to do it. Basically, when you clear the cache at a certain time, any documents that were cached before that time get expired. You can do that in iRules, just not all at once. You would have some variable which contains a timestamp which is the last time you cleared the cache, and for each request you just check if the age of the document is longer than "time since cache was cleared" (which you do with CACHE::age, the clock command, and some math), and call CACHE::expire if it is. Then you need some way of updating that variable whenever you want to clear the cache. You probably want to store the variable in the session table, also.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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