I seem to be having some ex开发者_如何学编程tremely odd cache_money interactions.
When I am on the console, and I create a new instance of a class and save it I see the cache misses and cache stores on my memcached console output. Then when the create finishes I see a bunch of cache deletions.
If I then try to do any kind of find for the newly created object (or any other objects for that matter) I never see any cache access.
This is highly confusing. I could kind of understand if all finds never hit the cache (though that in and of itself would be an issue requiring investigation), but finds do seem to hit the cache when the object is being created (checking for associations and such).
Anyone have this experience in the past at all? Any thoughts?
AFAIK there isn't really much in the way of configuration options for cache_money, and it certainly doesn't seem like there are any that would be on by default and be creating these kinds of symptoms.
My cache_money config is basically straight out of the docs.
Any help would be greatly appreciated.
Okay, this looks like this was a problem on my side. I had some failing tests and thought they were due to a line of code in cache_money. I changed the line in the cache money code, and did a few other changes and my problem was fixed.
It seems though my fix to cache_money though actually broke things. I just installed a pristine copy of cache money and all is well with the world.
If this is in your tests, make sure you are either mocking memcached or flushing memcache in your test setup/before filters. CREAM!
精彩评论