Re: [Phplib-users] Caching MySQL queries
Brought to you by:
nhruby,
richardarcher
From: Donncha O C. <don...@tr...> - 2001-10-26 17:01:15
|
I prefer to use the filesystem also. I've almost got it going now but at the moment it hangs for a while before reading from the cache. I suspect the cache class I'm using is waiting for the cache file to close or something. *shrug* I'll keep at it for another half an hour, going home then, it's late here! If anyone wants my work in progress code mail me off list soon and I'll mail you. Or I could post it to the list if nobody objects to an attachment? Donncha. "nathan r. hruby" wrote: > > On Fri, 26 Oct 2001, Brian Popp wrote: > > > A database would obviously be the most portable. How about modifying > > page_open and page_close to include a database object (and it's > > corresponding cache) which gets restored/frozen at the start and finish of > > each page. I'm not sure if the additional overhead would offset any > > performance gains from the cache though? I guess it depends on the > > application. > > > > Isn't that what the session stuff does now? :) In theory your Cache class > shouldn't have to be stateful which means it wouldn't need to load at > start, and would be wasteful if you were laoding that extra info on pages > that don't need it. > > Files actually would be most portable (and depeding on your FS Caching and > disk speeds possibly fast enough -- certianly less meory / processor > overhead), but a shmem container would be the speediest, db I can't really > see as being useful if you're trying to speed up db queries, again, unless > they're really big queries and at that point you can cache stuff at the > application level. I'm probably biased though becasue MySQL is so fast nd > I try to make all my quries as amall as possible -- I tend to prefer to do > several small queries instead of one big one > > -n |