Time To Live

This is just a random thought that I had about Time To Live with session
variables. Is there a way to do that in Rails? I have created sessions
before. For example, what if I wanted to log off a person after a
certain peroid of inactivity?