cancel
Showing results for 
Search instead for 
Did you mean: 

Traffic Manager cache bypass

SOLVED
ops_mdm
Occasional Contributor

Traffic Manager cache bypass

Hi,

 

I've cache enabled on my Virtual Server that works fine and I have a particular html page in the cache. If a client arrives from a particular IP or Cookie, I want to bypass the cache to go directly to the backend pool (I don't want to disable cache).

 

Is it possible ? If yes, how to do that ?

 

Regards.

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaulWallace
Contributor

Re: Traffic Manager cache bypass

Hello, there are a few articles on the community about cache management, I have reposted them here for information:

http://community.brocade.com/t5/vADC-Docs/Feature-Brief-Stingray-Content-Caching/ta-p/73625

http://community.brocade.com/t5/vADC-Blog/Content-caching-for-dynamic-web-applications-with-Stingray...

 

Of course, yoiu could attempt to enable/disable the cache each time but that might impact other users. 

 

One method you could use to force a page to bypass the cache would be to add a "no-cache" header to the current request; note that this would bypass the cache, send the request to the servers, and would update the cache on the response:

 

 
If (condition) {
   http.addHeader( "Cache-Control", "no-cache" );
}
 
Alternatively, you could create a "non-cached" virtual server: Create a new virtual server which responds to the non-cached version, say, "nocache.mydomain.com" and include any processing rules you want in the non-cached version. Then in the original virtual server, trap the special requests and redirect to the new service. 
 
If (condition) {
http.redirect( "http://nocache.mydomain.com" );
}
 
http.redirect() issues a response code 302 to redirect to the non-cached service, which then bypass the cache in the main service, and give complete control over what happens in the non-cached service.
 
 
 

View solution in original post

3 REPLIES 3
Baptiste Assmann
Occasional Contributor

Re: Traffic Manager cache bypass

Hi ops_mdm,

 

Maybe the following TS could do the trick:

 

$remote_ip = request.getremoteip();
if (http.cache.exists() && string.IPMaskMatch( $remote_ip, "10.0.0.0/16" )) {
  pool.use(...)
}

Baptiste

ops_mdm
Occasional Contributor

Re: Traffic Manager cache bypass

Hi Baptiste,

 

It doesn't works. pool.use or pool.select don't stop the rules processing and cache access (apparently).

 

Regards.

PaulWallace
Contributor

Re: Traffic Manager cache bypass

Hello, there are a few articles on the community about cache management, I have reposted them here for information:

http://community.brocade.com/t5/vADC-Docs/Feature-Brief-Stingray-Content-Caching/ta-p/73625

http://community.brocade.com/t5/vADC-Blog/Content-caching-for-dynamic-web-applications-with-Stingray...

 

Of course, yoiu could attempt to enable/disable the cache each time but that might impact other users. 

 

One method you could use to force a page to bypass the cache would be to add a "no-cache" header to the current request; note that this would bypass the cache, send the request to the servers, and would update the cache on the response:

 

 
If (condition) {
   http.addHeader( "Cache-Control", "no-cache" );
}
 
Alternatively, you could create a "non-cached" virtual server: Create a new virtual server which responds to the non-cached version, say, "nocache.mydomain.com" and include any processing rules you want in the non-cached version. Then in the original virtual server, trap the special requests and redirect to the new service. 
 
If (condition) {
http.redirect( "http://nocache.mydomain.com" );
}
 
http.redirect() issues a response code 302 to redirect to the non-cached service, which then bypass the cache in the main service, and give complete control over what happens in the non-cached service.