Permalink
Browse files

Update the spec

  • Loading branch information...
1 parent a7ce535 commit dab31d28403d8a4a66e1c394713ab1f9645b4b04 @wycats committed Jul 8, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 README
View
7 README
@@ -31,6 +31,11 @@ The API:
#[](key):: retrieve a key. if the key is not available, return nil
+#fetch(key, &block):: retrieve a key. if the key is not available, execute the
+ block and return its return value.
+
+#fetch(key, value) retrieve a key. if the key is not available, return the value
+
#[]=(key, value):: set a value for a key. if the key is already used, clobber it.
keys set using []= will never expire
@@ -40,7 +45,7 @@ The API:
#has_key?(key):: alias for key?
-#store(key, value, options):: same as []=, but you can supply an :expires_in option,
+#store(key, value, options):: same as []=, but you can supply an :expires_in option,
which will specify a number of seconds before the key
should expire. In order to support the same features
across all stores, only full seconds are supported

0 comments on commit dab31d2

Please sign in to comment.