How to I dynamically set the expiry time for a cookie-based session in Rails

前端 未结 6 697
失恋的感觉
失恋的感觉 2021-02-02 01:32

I\'m currently using the ActiveRecord-based session store for my Rails app and I have a background process which clears out inactive sessions every 30 minutes.

I\'d like

6条回答
  •  误落风尘
    2021-02-02 01:55

    Use this, it's working for me in rails 2.1.x:

    SlidingSessions

    I currently have cookies set to expire exactly 2 weeks after a user logs in, and setting it to 30 minutes is simple.

提交回复
热议问题