Sha256: 9384db462b2391bc9c3ed2f25b8d1d76afe17cf04e8c52e1bb48e7300de011a1

Contents?: true

Size: 962 Bytes

Versions: 2

Compression:

Stored size: 962 Bytes

Contents

= klarlack

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

See also: http://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 <tt>-T 127.0.0.1:6082</tt>. Then run

  spec spec

=== TODO

* Support authentication when varnishd is started with <tt>-S</tt>
* Make parameter manipulation/display more friendly

=== WTF?

http://dict.leo.org/?search=klarlack

=== Copyright

Copyright (c) 2009 Max Schöfmann. Distributed under the MIT-License

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
klarlack-0.0.4 README.rdoc
klarlack-0.0.3 README.rdoc