Various Rails caching optimizations to reduce database load