Just a mild comment: recently I rewrote the software that generates my homepage (http://www.mrnick.binary9.net) and encountered a situation where I needed to take snapshots of my own pages.
The system works by a file-system based method. In the root directory of my page lives the .cgi. Each "section" of my homepage is a directory under that root with specially named files; like "blurb.html", or "title.txt" or "blurb.cgi". The main cgi scans the directory and does stuff with it. Those directories can also have subdirectories which can, of course, have more.
I found that doing all the scanning, reading of files and such was taking more and more time to execute. I also realized that there is no reason to regenerate the page if nothing has changed.
So I wrote some simple snapshot functions that compared the date of all the files in the directory with the snapshot's date. If anything had changed, it would regen the snapshot, if not, then just pump it back at the user.
I thought it interesting. Go ahead and take a look at it; I've already taken up enough space here.
The code. Look for chk_snapshot() and mk_snapshot().
In reply to Re: static view of dynamic site
by mr.nick
in thread static view of dynamic site
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |