schoefmax / klarlack
- Source
- Commits
- Network (3)
- Issues (1)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
ffdac55
commit ffdac550004417a40404b625d3797ac3a9c30fc8
tree c8624598716416191e2c1e17c9449058a383c06e
parent a9e49851150eb48ded572d6a05740984b8330c82
tree c8624598716416191e2c1e17c9449058a383c06e
parent a9e49851150eb48ded572d6a05740984b8330c82
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 | Fri Apr 24 02:35:54 -0700 2009 | |
| |
klarlack.gemspec | Fri Apr 24 02:35:54 -0700 2009 | |
| |
lib/ | ||
| |
spec/ |
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

