Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated readme.

  • Loading branch information...
commit 24f3e4e6eb7f1e1c56fb43d22580fe2601f5b5da 1 parent abaa231
@jnunemaker authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 README.rdoc
View
21 README.rdoc
@@ -7,6 +7,27 @@ ActiveSupport MongoDB Cache store.
* Ruby 1.8.7 and 1.9.2+
* ActiveSupport 3+
+== Installation and Usage
+
+ gem install bin
+
+ require 'bin'
+
+ collection = Mongo::Connection.new.db('testing')['testing']
+ collection.remove
+
+ bin = Bin::Store.new(collection)
+ bin.write('abc', 123)
+ pp bin.read('abc')
+
+ pp bin.read('def')
+ pp bin.fetch('def') { 456 }
+ pp bin.read('def')
+
+Using bin with rails is as easy as:
+
+ config.cache_store = :bin, Mongo::Connection.new.db('myapp')['cache']
+
== Note on Patches/Pull Requests
* Fork the project.
Please sign in to comment.
Something went wrong with that request. Please try again.