From: Matthew Smillie Date: 2006-02-02T08:17:42+09:00 Subject: Re: check for and if not there, create direcory and file On Feb 1, 2006, at 21:43, konsu wrote: > hello, > > wrote in message > news:Pine.LNX.4.62.0601301323530.4780@harp.ngdc.noaa.gov... > >> >> heh - i probably do get a little pedantic with that stuff - but >> it's so >> hard >> to debug i just try to avoid it all together! ;-) >> >> > > i think it is not possuble to avoid this problem in a web > application which > caches its output in the server's filesystem. is it? > > your code returns an error if it cannot create the file, how do you > handle > this error? when trying to create a cache in a web application, > would sleep > and retry strategy be reasonable here? > If it has to be a file, I would use unique names keyed to the session id or user name or whatever you happen to be tracking. Imagine trying to sleep & retry for even 10 concurrent requests. Ick. matthew smillie.