Skip to content

Commit

Permalink
Modified the Readme to reflect the ability to selectively cache certa…
Browse files Browse the repository at this point in the history
…in models.
  • Loading branch information
PatrickTulskie authored and ngmoco:) committed Apr 23, 2010
1 parent 0e9c165 commit 73d5fb6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,22 @@ For queries on multiple attributes, combination indexes are necessary. For examp
index [:name, :age]
end

#### Optional: Selectively cache specific models

There may be times where you only want to cache some of your models instead of everything.

In that case, you can omit the following from your `config/initializers/cache_money.rb`

class ActiveRecord::Base
is_cached :repository => $cache
end
After that is removed, you can simple put this at the top of your models you wish to cache:

is_cached :repository => $cache

Just make sure that you put that line before any of your index directives.

## Version ##

WARNING: This is currently a RELEASE CANDIDATE. A version of this code is in production use at Twitter but the extraction and refactoring process may have introduced bugs and/or performance problems. There are no known major defects at this point, but still.
Expand Down

0 comments on commit 73d5fb6

Please sign in to comment.