Is there any built-in auto-cleanup of the "tmp" directory?

I need to generate some files that I only need for the duration of a user's session.

If I create these files in the Rails "tmp" directory, is there any automagic process that will periodically clean out the "tmp" directory, or is that something that I would have to manage myself?

rake tmp:cache:clear # Clears all files and directories in tmp/cache rake tmp:clear # Clear session, cache, and socket files from tmp/ rake tmp:create # Creates tmp directories for sessions, cache, and sockets rake tmp:sessions:clear # Clears all files in tmp/sessions rake tmp:sockets:clear # Clears all files in tmp/sockets

Add one or more of those to your crontab file and that should do it for you...

-philip

Wes Gamble wrote:

Actually, I'm not interested in killing sessions.

I wanted to know if I created my own directory under tmp, say "wes", would there ever by any automatic cleanup of that directory.

It appears there isn't so that I would have to manage it by hand.

If you are on Linux/Unix you can write a sh script to rm /path/to/wes/* and run it under cron.

Just a thought,

Long www.edgesoft.ca/blog/read/2