Re: Using caching to reduce database queries
| From: | Manuel Lemos | Date: | Fri, 10 May 2002 20:33:14 +0000 |
| Subject: | Re: Using caching to reduce database queries | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97012@lists.php.net to get a copy of this message | ||
Hello,
On 05/10/2002 04:15 PM, Jeff Bearer wrote:
Does anybody know of a class, module, extension that caches database output? I've asked this before, and I've looked high and low to no avail. I've used APC cache to do caching and it works great, but it doesn't save database queries, which easily becomes the bottleneck with highly dynamic site. It's a pretty big itch for me and I'm sure other's and I'm surprised that there isn't anybody scratching that itch. Just hoping something new is out there. ThanksThis class can do exactly what you need. http://www.phpclasses.org/filecache It caches arbitrary data to files in disk. If you want to cache query results, store them all in a single array and use serialize() to generate a data stream to store in the cache files. However, practice recommends that you do not just cache queries but rather cache the data that is generated from those queries, being that HTML pages or something else. -- Regards, Manuel Lemos