Browse files

Modify the README

  • Loading branch information...
1 parent dc7b760 commit 61c89ec9cfa0ddab89fdba543e61b957ee0e37d5 @linhchauatl committed Mar 22, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1
@@ -1,11 +1,14 @@
This is a gem that provides Ruby objects with the capability of object caching. This gem is framework-agnostic, so it can be used in all the types of Ruby applications.
Object that wants to be cached must include Cacheable,
class Person
include Cacheable
and implement the method:
def self.fetch(attributes,args)
# Your code to do the real object retrieval here
# It can be database call, webservices call or complex object builder
@@ -14,7 +17,8 @@ and implement the method:
# for example Person.fetch(['first_name', 'last_name'], ['Linh', 'Chau'])
# But the combinations of attributes must be able to identify a unique object
When a Class includes Cacheable and defines the method "fetch", it's instances will become cacheable, and all the cache operations will be handled by the module Cacheable.

0 comments on commit 61c89ec

Please sign in to comment.