Coder Social home page Coder Social logo

elele / klarlack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from schoefmann/klarlack

1.0 1.0 0.0 102 KB

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

Home Page: http://github.com/schoefmax/klarlack

License: MIT License

Ruby 100.00%

klarlack's Introduction

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

klarlack's People

Contributors

elele avatar schoefmann avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.