Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Automatically Erase Ruby On Rails Session Files

DZone's Guide to

Automatically Erase Ruby On Rails Session Files

·
Free Resource
Add to your cron:

1 */4 * * *     find /tmp/ -name "ruby_sess*" -cmin +600 -exec rm \{} \;

Deletes sessions over ten hours old every four hours. Otherwise your /tmp will end up overflowing. This only applies you use the file store method of session storage with Rails.
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}