<commit_before>= memcache

This is the Geni memcached client. It started out as a fork of fiveruns/memcache-client,
which was a fork of seattle.rb's memcache-client, but over time, our client has diverged,
and I've rewritten most of the code. Of course, a lot of credit is due to those whose code
served as a starting point for this code.

== Usage

 cache = Memcache.new(:server => "localhost:11211")
 cache.set('stuff', [:symbol, 'String', 1, {:bar => 5}])
 cache.get('stuff')
 => [:symbol, "String", 1, {:bar => 5}]

 cache['things'] = {:foo => '1', :bar => [1,2,3]}
 cache['things']
 => {:foo => "1", :bar => [1,2,3]}

== How is this different from memcache-client?

Like memcache-client, _memcache_ (shown in italics when I am referring to this
library) is a memcached client, but it differs significantly from memcache-client in
several important ways.

=== Interface

I tried to keep the basic interface as similar as I could to memcache-client. In some
cases, _memcache_ can be a near drop-in replacement for memcache-client. There are differences though.

- I renamed the main class from +MemCache+ to +Memcache+ to prevent confusion and to force
  those switching to _memcache_ to update their code.

- +expiry+ and +raw+ are specified as options in a hash now, instead of as unnamed parameters.

   cache.set('foo', :a,  :expiry => 10.minutes)
   cache.set('bar', :b,  :expiry => Time.parse('5:51pm Nov 24, 2018'))
   cache.set('baz', 'c', :expiry => 30.minutes, :raw => true)

- +get_multi+ has been replaced by a more versatile +get+ interface. If the first argument is
  an array, then a hash of key/value pairs is returned. If the first argument is not an
  array, then the value alone is returned.

   cache.get('foo')          # => :a
   cache.get(['foo', 'bar']) # => {"foo"=>:a, "bar"=>:b}
   cache.get(['foo'])        # => {"foo"=>:a}
<commit_msg>README tweak<commit_after>= memcache

This is the Geni memcached client. It started out as a fork of fiveruns/memcache-client,
which was a fork of seattle.rb's memcache-client, but over time, our client has diverged,
and I've rewritten most of the code. Of course, a lot of credit is due to those whose code
served as a starting point for this code.

== Usage

 cache = Memcache.new(:server => "localhost:11211")
 cache.set('stuff', [:symbol, 'String', 1, {:bar => 5}])
 cache.get('stuff')
 => [:symbol, "String", 1, {:bar => 5}]

 cache['things'] = {:foo => '1', :bar => [1,2,3]}
 cache['things']
 => {:foo => "1", :bar => [1,2,3]}

== How is this different from memcache-client?

Like memcache-client, _memcache_ (shown in italics when I am referring to this
library) is a memcached client, but it differs significantly from memcache-client in
several important ways.

=== Interface

I tried to keep the basic interface as similar as I could to memcache-client. In some
cases, _memcache_ can be a near drop-in replacement for memcache-client. However, I did
rename the main class from +MemCache+ to +Memcache+ to prevent confusion and to force
those switching to _memcache_ to update their code. Here are the notable interface
changes:

- +expiry+ and +raw+ are specified as options in a hash now, instead of as unnamed parameters.

   cache.set('foo', :a,  :expiry => 10.minutes)
   cache.set('bar', :b,  :expiry => Time.parse('5:51pm Nov 24, 2018'))
   cache.set('baz', 'c', :expiry => 30.minutes, :raw => true)

- +get_multi+ has been replaced by a more versatile +get+ interface. If the first argument is
  an array, then a hash of key/value pairs is returned. If the first argument is not an
  array, then the value alone is returned.

   cache.get('foo')          # => :a
   cache.get(['foo', 'bar']) # => {"foo"=>:a, "bar"=>:b}
   cache.get(['foo'])        # => {"foo"=>:a}

{'fraction_non_alphanumeric': 0.13546666666666668, 'fraction_numerical': 0.016, 'mean_word_length': 3.9748010610079576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3973555', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1154, 'n_words': 505}