[thelist] How to implement static page generator?

Les Lytollis les.lytollis at morse.com
Fri Mar 8 07:42:00 CST 2002


> -----Original Message-----
> Basically, I want the admin
> program to generate the html pages, and write it out, and
> retire them into an archives folder once the month is over.

So it sounds like you want to do a bit of page caching along with some
simple content management (launch, expire).

> If I change, for instance, my menu structure so it has one
> extra link in it, how will I be able to get my program to
> regenerate all the static files? (entry info will be stored
> in a db, btw).

Store the menu structure in the db, too and do a cache refresh when it
changes?

> ..I'm planning on
> having other parts of the site which I'll want to do the
> same thing with...How could I implement some way of doing the first
> one, so that when I want to make a change to the template
> structure I can have it automatically regenerate all the
> pages?

Store the caching scripts as functions or classes and "include" or "require"
them in your page generation templates.

>
> Any ideas?
>

Take a look at these explanations of caching with PHP

http://dealnews.com/apachecon/apachecon.html

http://www.phpbuilder.com/columns/brunner20011113.php3


> P.S. (I know systems are already round for blogging and
> this type of thing. I want to reinvent the wheel for the
> purpose of teaching myself, so please no replies telling me
> I should be using xyz blog software).

OK, but if you change your mind ;), there's a list of cache managers here:
http://php.weblogs.com/php_debugger_cache






More information about the thelist mailing list