Closed rwygand closed 14 years ago
Interesting.
I seem to have resolved this by enabling automatic_caching in cache_money.rb via memcached.yml. Previously, I was specifying ' is_cached :repository => $cache' in each model I wanted cached, but this was not working, as stated above.
I believe I found it. abstract.rb calls @active_record.cachable? which is defined in the NoCash module in cache_money.rb. But the mirror function, in the CashMoney module is spelled 'cacheable' with an 'e'. This means that even if you set is_cached in your model, you will always call NoCash::cachable.
Do you have a diff?
Successfully registered gem: ngmoco-cache-money (0.2.21)
I'm evaluating cache-money for possible uses and it looks completely awesome, but I'm seeing an issue I don't understand. Essentially, records I'd expect to be indexed aren't being indexed. Here's the code where the query comes from:
and in the server logs I see
I was under the impression I would not need to specify an index for primary keys, but I've also tried this with the same result: no caching. What must I be doing incorrectly?