just call "varnishadm" with the ban command you need from ruby under the system() call<div><br></div><div>system("varnishadm -T somehost:6082 ban.url /images") </div><div><br></div><div><br><br><div class="gmail_quote">
On Thu, Mar 1, 2012 at 3:48 AM, Per Buer <span dir="ltr"><<a href="mailto:perbu@varnish-software.com">perbu@varnish-software.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br><div class="gmail_quote"><div class="im">On Wed, Feb 29, 2012 at 11:27 PM, S Ahmed <span dir="ltr"><<a href="mailto:sahmed1020@gmail.com" target="_blank">sahmed1020@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


How would you go about invalidating a cache with ruby?</blockquote><div><br></div></div><div>You either use HTTP PURGE against Varnish or issue a ban. See the tutorial for details.</div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>Also, from what I understand varnish doesn't support clustering.  What if you grow past a single server, do you somehow use a hashing algorithm to choose which server will have the cached page?  (if yes, then at what layer will this hashing be done?)</div>


</blockquote><div><br></div></div><div>You can either use Varnish as a load balancer (it is rather good at load balancing) use the hash director or any other load balancer  that supports "URL target" hashing.</div>
<div>

<br></div></div><font color="#888888">-- <br><img><div>Per Buer, CEO<br>Phone: <a href="tel:%2B47%2021%2098%2092%2061" value="+4721989261" target="_blank">+47 21 98 92 61</a> / Mobile: <a href="tel:%2B47%20958%2039%20117" value="+4795839117" target="_blank">+47 958 39 117</a> / Skype: per.buer<br>
<i>Varnish makes websites fly!</i><div>

<a href="http://www.varnish-software.com/whitepapers" target="_blank">Whitepapers</a> | <a href="http://www.youtube.com/watch?v=x7t2Sp174eI" target="_blank">Video</a> | <a href="https://twitter.com/varnishsoftware" target="_blank">Twitter</a> <br>


<br></div></div><br>
</font><br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div>