automatically use the rails cache object if rails is defined