Re: [PHP] How should I cache database data for php?

2002-01-22 Thread B Richards
I've been following this discussion and has anyone tried smarty? smarty is a template but also does caching. haven't tried it but i think you can set the cache to be like 30 seconds and it will display a cached html page instead of hitting your database. i think you can also cach only

RE: [PHP] How should I cache database data for php?

2002-01-22 Thread Robert V. Zwink
I use cachedFastTemplate for caching Dynamic content. http://px.sklar.com/code.html?code_id=312 Used in conjection with FastTemplate class. Very useful. Also see: http://www.php.net/manual/en/function.ob-start.php Output buffering in php can be used to cache dynamic content. Robert V. Zwink

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 16:25 * Jeff Bearer said Hello, I have a PHP content management application that I've developed. I'm looking to add data caching to it so the database doesn't get pounded all day long, the content on the site

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Jeff Bearer
On Mon, 2002-01-21 at 10:30, Nick Wilson wrote: I have a PHP content management application that I've developed. I'm looking to add data caching to it so the database doesn't get pounded all day long, the content on the site changes slowly, once or twice a day. On that basis

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 16:47 * Jeff Bearer said On Mon, 2002-01-21 at 10:30, Nick Wilson wrote: I have a PHP content management application that I've developed. I'm looking to add data caching to it so the database doesn't get pounded

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Jeff Bearer
Well, if you're caching but having your content updated twice a day wouldn't you be better off letting the db take the strain? I don't see how else you are going to make sure people are seeing the latest content as opposed to cached pages that are out of date. Let your db do the work, that's

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
But at 300,000 page views a day, even if the caches only have a ttl of 1 hour I'm still saving over %90 of the traffic from having to query the database. During our busy times I have a bottle neck with the database maxing out the CPU's, so If I can cut the queries the server won't be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 17:24 * val petruchek said The greatest way of doing this is 1. develope php-script for generating updated html from moved php-script and updating index.html (e.g. ;) 2. develope another script or program which

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
The greatest way of doing this is 1. develope php-script for generating updated html from moved php-script and updating index.html (e.g. ;) 2. develope another script or program which will call the first one periodically (once an hour, e.g.) I like that. It sounds similar to

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
The greatest way of doing this is 1. develope php-script for generating updated html from moved php-script and updating index.html (e.g. ;) 2. develope another script or program which will call the first one periodically (once an hour, e.g.) I like that. It sounds similar to

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
Since reading your first post I've been racking my brains/teasing my memory. I'm sure there's an article on one of the popular PHP sites that talks about exactly this: creating a web page dynamically, but serving it as static HTML (ie with no back-end db access per serving). This idea came to

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Richard Crawford
Are you sure that cacheing database data is the right way to approach the problem? How about using a cron job to write static HTML pages from live data? You could set up such a system to run every few hours or so. I haven't done that in PHP, but it's something I'm looking at doing for a

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Richard Crawford
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be misunderstanding

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Richard Crawford
DL Neil wrote: Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Jeff Bearer
DN, Yes the db server and the webserver are on the same box, local connections are much faster than network ones according to mysql. When the site is busy the percent of the system being used by mysql and that being used by PHP/Apache, I estemate would be around 90%-10% so if I get the

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Jeff, Seeing Richard thinks I have blue (?blood) in (my) veins, I'd better respond nobly and quickly... Yes the db server and the webserver are on the same box, local connections are much faster than network ones according to mysql. When the site is busy the percent of the system being

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Manuel Lemos
Hello, Jeff Bearer wrote: I want the app to query the caching layer just about the same way it queries the database, but add a few other details, time to live, cache name etc. The caching layer will check to see if the query is cached, make sure it's not expired, and return the data just

RE: [PHP] How should I cache database data for php?

2002-01-21 Thread Matt Friedman
:[EMAIL PROTECTED]] Sent: Monday January 21, 2002 10:07 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] How should I cache database data for php? Hello, Jeff Bearer wrote: I want the app to query the caching layer just about the same way it queries the database, but add a few other details, time

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread Peter Janett
PostgreSQL coming soon! http://www.newmediaone.net [EMAIL PROTECTED] - Original Message - From: Matt Friedman [EMAIL PROTECTED] To: 'Manuel Lemos' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, January 21, 2002 9:16 PM Subject: RE: [PHP] How should I cache database data for php? My