Re: [PHP] PHP caching ideas?
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. If a page has parts that change and not you can make frameset. In a frame that does not change you send caching headers. Durign generating page you can cache in memory unchangeble parts. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP caching ideas?
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 + 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 worlds 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
Re: [PHP] PHP caching ideas?
Smarty template will allow you to cache certain pieces. http://smarty.php.net olinux --- Krzysztof Dziekiewicz [EMAIL PROTECTED] wrote: 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. If a page has parts that change and not you can make frameset. In a frame that does not change you send caching headers. Durign generating page you can cache in memory unchangeble parts. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP caching ideas?
Though, I would not reccomend it to you as your caching mechanism. Only for when you are actually using Smarty.. which is still makes no much sence since Smarty is saving the compiled version of your file. Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // where PHP Begins On Mon, 14 Oct 2002 08:02:37 -0700 (PDT) olinux [EMAIL PROTECTED] wrote: Smarty template will allow you to cache certain pieces. http://smarty.php.net olinux --- Krzysztof Dziekiewicz [EMAIL PROTECTED] wrote: 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. If a page has parts that change and not you can make frameset. In a frame that does not change you send caching headers. Durign generating page you can cache in memory unchangeble parts. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.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
[PHP] PHP caching ideas?
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 worlds 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