Thanks for the responses!
I eventually used the user_alert.conf file, here's what I did:
iRule
Delete cache on request, based on source IP
iRule log triggers /config/user_alert.conf
to clear the cache!
when HTTP_REQUEST {
Check URI
if { [string tolower [HTTP::uri]] contains "delete-cache-now" } {
set ip1 a.a.a.a/32
set ip2 b.b.b.b/32
set ip3 c.c.c.c/32
Check Source IP
if { [IP::addr [IP::client_addr] equals $ip1] or [IP::addr [IP::client_addr] equals $ip2] or [IP::addr [IP::client_addr] equals $ip3] } {
HTTP::respond 200 content "Cache CleanHello [IP::client_addr]
Cache cleaned!"
log local0. "EVENT-CACHE-DELETE-REQUEST-GOOD!!! - IP [IP::client_addr]"
Stop processing iRules for this connection
event disable
return
}
}
}
/config/user_alert.conf
alert Delete-Cache-Request "EVENT-CACHE-DELETE-REQUEST-GOOD!!!" {
exec command="tmsh -c 'delete ltm profile ramcache http-wan-optimized-compression-caching-cache'"
}