On Jan 13, 2008 4:19 PM, Colin Wetherbee <[EMAIL PROTECTED]> wrote: > I thought about the file thing... if the file exists, check its last > modified timestamp; if that timestamp is greater than the stored > timestamp, then update the data from the database. It seems like > unnecessary disk access, though. Then again, this whole problem is > riddled with unnecessary disk access. :)
Using a "touch file" is the classic solution to this problem. You check the mod time on a file (it's okay for it always be there -- it's just the mod time we care about) and compare that to the last update time that you keep in a global. It's dirt simple, avoids messy problems with signals, and it should end up in your operating system's disk cache so it really won't do any physical disk reads. - Perrin