vADC Docs

Clearing the Stingray Content Cache

by riverbed on ‎10-03-2011 12:40 PM (1,529 Views)

(Originally posted by Owen Garrett on Sept 9, 2006. Updated by Paul Wallace on 31st January 2014)

The following Perl example illustrates how to invoke the System.Cache.clearWebCache() method to clear the content cache on the local Stingray Traffic Manager or Load Balancer.


  1. #!/usr/bin/perl -w

  2. use SOAP::Lite0.60;

  3. # This is the url of the ZXTM admin server - CHANGE THIS

  4. my $admin_server ='https://adminSmiley Tongueassword@zxtmhost:9090';

  5. my $conn = SOAP::Lite

  6.   -> ns('http://soap.zeus.com/zxtm/1.0/System/Cache/')

  7.   -> proxy("$admin_server/soap")

  8.   -> on_fault(sub{

  9.       my( $conn, $res )=@_;

  10.       dieref $res ? $res->faultstring : $conn->transport->status;});

  11. $conn->clearWebCache();

Comments
by ranjan7k
on ‎07-17-2012 11:26 AM

Hi Emarcus,

 

Gr8 stuff. Could you please guide how we could clear a specific cached object using the zeus api. Suppose I have a cached copy http://abc.com/static/image.gif & https://abc.com/static/image.gif and I want to use script to flush cache whenever I modify my content by passing the modified content name in a file.

 

Thanks,

Ranjan

by fmemon
on ‎08-07-2012 05:34 PM

Hi Ranjan,

 

Sorry for the late reply.  Looking through the Stingray Control API documentation found here:

 

https://support.riverbed.com/download.htm?filename=public/doc/stingray/developer_edition/Stingray_9.0_Control_API.pdf

 

There is clearMatchingCacheContent (protocol, host_wildcard, path_wildcard), so try something like:

 

clearMatchingCacheContent('http', "abc.com", "static/image.gif");

clearMatchingCacheContent('https', "abc.com", "static/image.gif");

 

or

 

clearMatchingCacheContent('both', "abc.com", "static/image.gif);

 

To cover both http and https.  Hope this helps.

 

Thanks,

Faisal