if Rails.cache
Rails.cache.fetch(20.to_s) # ec2-50-17-225-XX.compute-1.amazonaws.com:11212
Rails.cache.fetch(0.to_s) # ec2-174-129-33-XX.compute-1.amazonaws.com:11212
Rails.cache.fetch(10.to_s) # ec2-174-129-16-XX.compute-1.amazonaws.com:11212
Rails.cache.fetch(30.to_s) # ec2-54-242-2-XX.compute-1.amazonaws.com:11212
end
我不完全确定这段代码的作用。是设置缓存变量吗?它以某种方式阅读吗?