README.md in dalli-2.6.4 vs README.md in dalli-2.7.0

- old
+ new

@@ -1,6 +1,6 @@ -Dalli [![Build Status](https://secure.travis-ci.org/mperham/dalli.png)](http://travis-ci.org/mperham/dalli) [![Dependency Status](https://gemnasium.com/mperham/dalli.png)](https://gemnasium.com/mperham/dalli) +Dalli [![Build Status](https://secure.travis-ci.org/mperham/dalli.png)](http://travis-ci.org/mperham/dalli) [![Dependency Status](https://gemnasium.com/mperham/dalli.png)](https://gemnasium.com/mperham/dalli) [![Code Climate](https://codeclimate.com/github/mperham/dalli.png)](https://codeclimate.com/github/mperham/dalli) ===== Dalli is a high performance pure Ruby client for accessing memcached servers. It works with memcached 1.4+ only as it uses the newer binary protocol. It should be considered a replacement for the memcache-client gem. The name is a variant of Salvador Dali for his famous painting [The Persistence of Memory](http://en.wikipedia.org/wiki/The_Persistence_of_Memory). @@ -33,12 +33,11 @@ ------------------------------------------------ Dalli should work identically on: * JRuby 1.6+ - * Ruby 1.9.2+ - * Ruby 1.8.7+ + * Ruby 1.9.3+ * Rubinius 2.0 If you have problems, please enter an issue. @@ -71,11 +70,11 @@ Dalli has no runtime dependencies and never will. You can optionally install the 'kgio' gem to give Dalli a 20-30% performance boost. -Usage with Rails 3.x +Usage with Rails 3.x and 4.x --------------------------- In your Gemfile: ```ruby @@ -111,12 +110,26 @@ ``` Dalli does not support Rails 2.x. +Multithreading and Rails +-------------------------- + +If you use Puma or another threaded app server, as of Dalli 2.7, you can use a pool +of Dalli clients with Rails to ensure the `Rails.cache` singleton does not become a +source of thread contention. You must add `gem 'connection_pool'` to your Gemfile and +add :pool\_size to your `dalli_store` config: + +```ruby +config.cache_store = :dalli_store, 'cache-1.example.com', { :pool_size => 5 } +``` + + Configuration ------------------------ + Dalli::Client accepts the following options. All times are in seconds. **expires_in**: Global default for key TTL. Default is 0, which means no expiry. **failover**: Boolean, if true Dalli will failover to another server if the main server for a key is down. @@ -159,17 +172,18 @@ It will detect sockets shared with child processes and gracefully reopen the socket. Note that Dalli does not require ActiveSupport or Rails. You can safely use it in your own Ruby projects. -[View the API](http://www.ruby-doc.org/gems/docs/d/dalli-2.6.2/Dalli/Client.html) +[View the Client API](http://www.rubydoc.info/github/mperham/dalli/Dalli/Client) Helping Out ------------- If you have a fix you wish to provide, please fork the code, fix in your local project and then send a pull request on github. Please ensure that you include a test which verifies your fix and update History.md with a one sentence description of your fix so you get credit as a contributor. +We're not accepting new compressors. They are trivial to add in an initializer. See #385 (LZ4), #406 (Snappy) Thanks ------------ Eric Wong - for help using his [kgio](http://unicorn.bogomips.org/kgio/index.html) library. @@ -180,14 +194,12 @@ Author ---------- -Mike Perham, mperham@gmail.com, [mikeperham.com](http://mikeperham.com), [@mperham](http://twitter.com/mperham) If you like and use this project, please give me a recommendation at [WWR](http://workingwithrails.com/person/10797-mike-perham) or send a few bucks my way via my Pledgie page below. Happy caching! +Mike Perham, [mikeperham.com](http://mikeperham.com), [@mperham](http://twitter.com/mperham) -<a href='http://www.pledgie.com/campaigns/16623'><img alt='Click here to lend your support to Open Source and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/16623.png?skin_name=chrome' border='0' /></a> - Copyright ----------- -Copyright (c) 2012 Mike Perham. See LICENSE for details. +Copyright (c) Mike Perham. See LICENSE for details.