The most efficient way would be to cache the heaviest parts of the scripts. Such parts are database connections and its queries, templates rendering and any other things like XML, large data loops etc..
What I would suggest is to modulate your application logic by sections of different functionalities. There you can control the things easier. For instance, while loading an article out of the database that also includes several other queries, you can check against the most recent updated field relevant to that row and compare to the current time. If it changed since last visit load it again and save (by passing to some caching script of yours) as a cached file. Something like that. I do it pretty often, especially for dynamic downloads. Maxim Maletsky On Sat, 12 Oct 2002 13:33:32 +0000 "Hans Himmel" <[EMAIL PROTECTED]> wrote: > Hello there, > > How do most people here create their caching logic for PHP scripts? The > problem is that most PHP scripts have some part of the page that is unique > to each request (let it be current time, e-mail list in an e-mail reading > application, session IDs on some servers, or whatever). > > Is the general logic to slice the page into some general pieces. For example > ones that have always general data and those that change. Then the ones that > don't change are streamed to the user using passthrough and the rest of the > page is generated dynamically with the newest relevant data. > > Or are there any other good ideas to solve PHP caching problems? > > Thanks, > Hans > > _________________________________________________________________ > Join the world’s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // where PHP Begins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php