This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
klarlack /
| name | age | message | |
|---|---|---|---|
| |
.document | Fri Apr 03 12:07:45 -0700 2009 | |
| |
.gitignore | Fri Apr 03 12:07:45 -0700 2009 | |
| |
LICENSE | Fri Apr 03 12:07:45 -0700 2009 | |
| |
README.rdoc | Mon Nov 16 01:23:01 -0800 2009 | |
| |
Rakefile | Thu Apr 23 05:54:41 -0700 2009 | |
| |
VERSION.yml | Tue Dec 08 00:02:47 -0800 2009 | |
| |
klarlack.gemspec | Tue Dec 08 00:05:37 -0800 2009 | |
| |
lib/ | Tue Dec 08 00:05:37 -0800 2009 | |
| |
spec/ | Mon Dec 07 15:33:16 -0800 2009 |
README.rdoc
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?
Copyright
Copyright © 2009 Max Schöfmann. Distributed under the MIT-License







