cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing the Stingray Content Cache

(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();

Version history
Revision #:
1 of 1
Last update:
‎10-03-2011 12:40:PM
Updated by:
 
Comments
ranjan7k

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

fmemon

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....

 

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