Cache fix.

Eating my own dogfood, I discovered a bug in the mongoid cache.
The cache now works properly.