我正在使用redis作为一个会话商店和其他一些东西。我使用gem redis-rails,我就是这样为heroku配置它的:
MyApp::Application.config.session_store :redis_store , redis_server: ENV['REDISTOGO_URL']如何以及在何处为所有红键设置默认的ttl?这有可能吗?
发布于 2014-05-13 14:13:10
您必须设置参数expire_in
MyApp::Application.config.session_store :redis_store,redis_server: ENV‘’REDISTOGO_URL‘,:expire_in => 900
单位以秒为单位
https://stackoverflow.com/questions/23632280
复制相似问题