Howdy fellow monks,
This is the basic outline of what I am trying to accomplish:
I have the first four parts working, but I am struggling with how to design the last one for good performance in a CGI environment.
There are two considerations. First, I need to ensure that the file-names don't get clobbered. Second, I would like to ensure that if a .gif has been created recently (say within 48 hours) it doesn't get recreated. This latter part is needed because the Excel-portion (especially the actually export) takes several seconds, so the server could get really bogged down on this.
The approach that comes to mind is to name the files according to a primary key from the database (well, the data is from multiple tables, but I can just concatenate the various keys together). I would then check the file-date, and if it is less than n-hours old, just display, otherwise unlink and make a new one.
Is that a sound approach? Are there other hidden gotchas in this kind of thing? Any/all advice/suggestions welcome!
-TatsIn reply to Strategies for temporary image files in CGI by Itatsumaki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |