Project

klarlack

0.03
No commit activity in last 3 years
No release in over 3 years
ruby client for varnishd's admin interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

klarlack¶ ↑

Klarlack is a ruby client library for the varnish administration interface.

See also: www.varnish-cache.org

Please note: You need at least version 2.0.3 of varnish for purging to work.

Installation (from gemcutter.org)¶ ↑

sudo gem install klarlack

Example¶ ↑

Lets purge all blog posts from the cache…

require 'rubygems'
require 'klarlack'

varnish = Varnish::Client.new '127.0.0.1:6082'
# the regexp is not a ruby regexp, just a plain string varnishd understands
varnish.purge :url, "^/posts/.*"

In a Rails app, you might want to use use this in a cache sweeper.

Specs¶ ↑

Start up a local varnishd with -T 127.0.0.1:6082. Then run

spec spec

TODO¶ ↑

  • Support authentication when varnishd is started with -S

  • Make parameter manipulation/display more friendly

WTF?¶ ↑

dict.leo.org/?search=klarlack

Copyright © 2009-2010 Max Schöfmann. Distributed under the MIT-License