0.0
No commit activity in last 3 years
No release in over 3 years
Adding some extra methods to Dalli
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0

Runtime

~> 2.7
 Project Readme

Dalli::Extra

Build Status

A small gem which adds some much needed methods to Dalli. The idea of this gem came after reading this post http://www.darkcoding.net/software/memcached-list-all-keys/ and seeing a similar gem "https://github.com/seratch/dallish"

Note

As this gem creates telent connections, its slower than Dalli. So its good fit for non-production uses like debugging, development or in background jobs.

Installation

Add this line to your application's Gemfile:

gem 'dalli-extra'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dalli-extra

Usage

require 'dalli'
require 'dalli/extra'
dc = Dalli::Client.new(['localhost:11211','localhost:11212'], :expires_in => 300)

all_keys = dc.keys
regex_matching_keys = dc.keys(/abc/)
string_containing_keys = dc.keys('abc')

all_pairs = dc.pairs
regex_matching_pairs = dc.pairs(/abc/)
string_containing_pairs = dc.pairs('abc')

count = dc.delete_matched(/abc/) or
count = dc.delete_macthed('abc')

stats = dc.cluster_stats

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request