Permalink
Browse files

Initial commit

  • Loading branch information...
mperham committed May 20, 2008
0 parents commit 91b9c2ceaa07ff5bfa1a4f513b0af2225d22231b
Showing with 1,816 additions and 0 deletions.
  1. +68 −0 History.txt
  2. +28 −0 LICENSE.txt
  3. +8 −0 Manifest.txt
  4. +54 −0 README.txt
  5. +19 −0 Rakefile
  6. +805 −0 lib/memcache.rb
  7. +90 −0 lib/memcache_util.rb
  8. +744 −0 test/test_mem_cache.rb
@@ -0,0 +1,68 @@
+= 1.5.0
+
+* Add MemCache#flush_all command. Patch #13019 and bug #10503. Patches
+ submitted by Sebastian Delmont and Rick Olson.
+* Type-cast data returned by MemCache#stats. Patch #10505 submitted by
+ Sebastian Delmont.
+
+= 1.4.0
+
+* Fix bug #10371, #set does not check response for server errors.
+ Submitted by Ben VandenBos.
+* Fix bug #12450, set TCP_NODELAY socket option. Patch by Chris
+ McGrath.
+* Fix bug #10704, missing #add method. Patch by Jamie Macey.
+* Fix bug #10371, handle socket EOF in cache_get. Submitted by Ben
+ VandenBos.
+
+= 1.3.0
+
+* Apply patch #6507, add stats command. Submitted by Tyler Kovacs.
+* Apply patch #6509, parallel implementation of #get_multi. Submitted
+ by Tyler Kovacs.
+* Validate keys. Disallow spaces in keys or keys that are too long.
+* Perform more validation of server responses. MemCache now reports
+ errors if the socket was not in an expected state. (Please file
+ bugs if you find some.)
+* Add #incr and #decr.
+* Add raw argument to #set and #get to retrieve #incr and #decr
+ values.
+* Also put on MemCacheError when using Cache::get with block.
+* memcache.rb no longer sets $TESTING to a true value if it was
+ previously defined. Bug #8213 by Matijs van Zuijlen.
+
+= 1.2.1
+
+* Fix bug #7048, MemCache#servers= referenced changed local variable.
+ Submitted by Justin Dossey.
+* Fix bug #7049, MemCache#initialize resets @buckets. Submitted by
+ Justin Dossey.
+* Fix bug #6232, Make Cache::Get work with a block only when nil is
+ returned. Submitted by Jon Evans.
+* Moved to the seattlerb project.
+
+= 1.2.0
+
+NOTE: This version will store keys in different places than previous
+versions! Be prepared for some thrashing while memcached sorts itself
+out!
+
+* Fixed multithreaded operations, bug 5994 and 5989.
+ Thanks to Blaine Cook, Erik Hetzner, Elliot Smith, Dave Myron (and
+ possibly others I have forgotten).
+* Made memcached interoperable with other memcached libraries, bug
+ 4509. Thanks to anonymous.
+* Added get_multi to match Perl/etc APIs
+
+= 1.1.0
+
+* Added some tests
+* Sped up non-multithreaded and multithreaded operation
+* More Ruby-memcache compatibility
+* More RDoc
+* Switched to Hoe
+
+= 1.0.0
+
+Birthday!
+
@@ -0,0 +1,28 @@
+All original code copyright 2005, 2006, 2007 Bob Cottrell, Eric Hodel,
+The Robot Co-op. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the names of the authors nor the names of their contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
@@ -0,0 +1,8 @@
+History.txt
+LICENSE.txt
+Manifest.txt
+README.txt
+Rakefile
+lib/memcache.rb
+lib/memcache_util.rb
+test/test_mem_cache.rb
@@ -0,0 +1,54 @@
+= memcache-client
+
+Rubyforge Project:
+
+http://rubyforge.org/projects/seattlerb
+
+File bugs:
+
+http://rubyforge.org/tracker/?func=add&group_id=1513&atid=5921
+
+Documentation:
+
+http://seattlerb.org/memcache-client
+
+== About
+
+memcache-client is a client for Danga Interactive's memcached.
+
+== Installing memcache-client
+
+Just install the gem:
+
+ $ sudo gem install memcache-client
+
+== Using memcache-client
+
+With one server:
+
+ CACHE = MemCache.new 'localhost:11211', :namespace => 'my_namespace'
+
+Or with multiple servers:
+
+ CACHE = MemCache.new %w[one.example.com:11211 two.example.com:11211],
+ :namespace => 'my_namespace'
+
+See MemCache.new for details.
+
+=== Using memcache-client with Rails
+
+Rails will automatically load the memcache-client gem, but you may
+need to uninstall Ruby-memcache, I don't know which one will get
+picked by default.
+
+Add your environment-specific caches to config/environment/*. If you run both
+development and production on the same memcached server sets, be sure
+to use different namespaces. Be careful when running tests using
+memcache, you may get strange results. It will be less of a headache
+to simply use a readonly memcache when testing.
+
+memcache-client also comes with a wrapper called Cache in memcache_util.rb for
+use with Rails. To use it be sure to assign your memcache connection to
+CACHE. Cache returns nil on all memcache errors so you don't have to rescue
+the errors yourself. It has #get, #put and #delete module functions.
+
@@ -0,0 +1,19 @@
+# vim: syntax=Ruby
+
+require 'hoe'
+
+$:.unshift 'lib'
+require 'memcache'
+
+hoe = Hoe.new 'memcache-client', MemCache::VERSION do |p|
+ p.summary = 'A Ruby memcached client'
+ p.description = p.paragraphs_of('README.txt', 8).first
+ p.author = ['Eric Hodel', 'Robert Cottrell']
+ p.email = 'drbrain@segment7.net'
+ p.url = p.paragraphs_of('README.txt', 6).first
+ p.changes = File.read('History.txt').scan(/\A(=.*?)^=/m).first.first
+
+ p.rubyforge_name = 'seattlerb'
+ p.extra_deps << ['ZenTest', '>= 3.4.2']
+end
+
Oops, something went wrong.

0 comments on commit 91b9c2c

Please sign in to comment.