I want to use cache money, but I do not want to start caching automatically (I work with a large production application, terabytes of data, etc.). How to use it only for the models that I indicate? Right now I have:
# initializers/cache_money.rb require 'cache_money' config = (cfg = YAML.load(IO.read(File.join(RAILS_ROOT, "config", "memcached.yml"))))[RAILS_ENV] || cfg["defaults"] $memcache = MemCache.new(config) $memcache.servers = config['servers'] $local = Cash::Local.new($memcache) $lock = Cash::Lock.new($memcache) $cache = Cash::Transactional.new($local, $lock)
and then in the model I want to cache cache money:
# my_model.rb class MyModel < ActiveRecord::Base is_cached :repository => $cache
But this does not work; calling is_cached causes the following error: NoMethodError: undefined `create 'method for Config: Module
Any ideas? Otherwise, can I find help with cash money? I could not find the mailing list or anything else.
source share