invalidating a page using ruby

Daniel Sell dredd422 at gmail.com
Fri Mar 2 19:51:42 CET 2012


Attached is the ruby code I used before.

On Thu, Mar 1, 2012 at 4:00 AM, AD <straightflush at gmail.com> wrote:

> just call "varnishadm" with the ban command you need from ruby under the
> system() call
>
> system("varnishadm -T somehost:6082 ban.url /images")
>
>
>
> On Thu, Mar 1, 2012 at 3:48 AM, Per Buer <perbu at varnish-software.com>wrote:
>
>> Hi,
>>
>> On Wed, Feb 29, 2012 at 11:27 PM, S Ahmed <sahmed1020 at gmail.com> wrote:
>>
>>> How would you go about invalidating a cache with ruby?
>>
>>
>> You either use HTTP PURGE against Varnish or issue a ban. See the
>> tutorial for details.
>>
>> 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?)
>>>
>>
>> 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.
>>
>> --
>> Per Buer, CEO
>> Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
>> *Varnish makes websites fly!*
>> Whitepapers <http://www.varnish-software.com/whitepapers> | Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |
>> Twitter <https://twitter.com/varnishsoftware>
>>
>>
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120302/cdbb91af/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: purge.rb
Type: application/octet-stream
Size: 332 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120302/cdbb91af/attachment.obj>


More information about the varnish-misc mailing list