Implement object-level caching for rails