Selectively cache models with cache_money

Instead, in the initializer cache_money.rb

class ActiveRecord::Base
  is_cached :repository => $cache
end

      

I want to be able to selectively cache only certain models (the reason our custom model breaks memcached is because it is usually too large to serialize properly).

class User < AR::Base
  is_cached :repository => $cache
end

      

This, however, throws an exception.

Any idea on how to do this?

+2
ruby caching ruby-on-rails memcached


source to share


No one has answered this question yet

Check out similar questions:

1554
Disable Chrome cache for website development
1398
How do we control web page caching in all browsers?
1001
Is Safari iOS 6 caching $ .ajax results?
951
How do I force the browser to reload the cached CSS / JS files?
683
What is "caching" code?
591
What's the difference between Cache-Control: max-age = 0 and no-cache?
4
Why does Django cache work with locmem but not memcached?
1
Caching associations in active model serializers
0
Hysterical fragment cache without a candle
0
In Rails 3.0 / 3.1, how am I supposed to cache the immutable data that is required for the entire application?



All Articles
Loading...
X
Show
Funny
Dev
Pics