Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

sudo gem install klarlack

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.

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

spec spec
  • Support authentication when varnishd is started with -S

  • Make parameter manipulation/display more friendly

dict.leo.org/?search=klarlack

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

About

klarlack is a ruby client library for the varnish administration interface. It allows, among other things, purging of cached objects from ruby code.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages