On Wednesday, Aug 27, 2003, at 07:18 US/Pacific, Shahar Evron wrote: [..]
I'm working on a CGI program that creates some user-specific[..]
file on the server when accessed. is there a good way to make
sure theese files are cleared when they're no longer needed -
IE if a file in a specific directory was not accessed for 5 minutes, delete it.
I hate to suggest the alternative, but why not use a 'cookie' to cache that information on the user's side?
I can appreciate the problem, but what I would argue is that you might want to set up a nightly cron that goes in and clears out your temp-directory in one pleasant pass for any file that has not been accessed in the last hour.
So a part of the problem is tied up with why are you writing out the information to a bunch of files rather than putting in some sort of 'DB' service that would manage the information as DB records, then running a purge routine on the 'old records'?
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]