From: Dan F. <dfr...@cs...> - 2005-05-09 15:13:01
|
Reini Urban wrote: > Dan Frankowski schrieb: > >> I have a question for experienced PHP developers. There is a lot of >> information I can imagine wanting to cache across sessions in PHP. >> For example in WikiLens, a ratings database, or per-item statistics >> (# ratings, averages, etc). This is stuff that will fit in-memory for >> the forseeable future. >> >> What's the best way to do that in PHP? I've looked at a couple of >> PEAR modules (e.g., "Cache" included in PhpWiki), and they seem to be >> file-based. This is astonishing to me. Clearly memory can be 1000 >> times faster than disk (although there are usually memory-based disk >> caches, too). Is it really best to use file-based caches? I thought >> about writing a shared memory-based cache, and a colleague warned me >> away from it, saying shared memory access in PHP is iffy. >> >> Thoughts? > > > Are you aware about our max-size limitation of sessions > how we are using them? No, I don't know about this. > If this could be solved we could put much more into regular sessions > and wouldn't need external libs, such as > http://www.phpclasses.org/browse/package/439.html Thanks for the ref! This looks like a useful package. Note that I don't think stuffing the ratings DB (or stats like # rats or avg item rating) into each user session will help me. I want it cached *across* user sessions, so each user isn't burdened with re-reading, re-calculating. I plan to try the shmem thing. > I'm running a stable windows server with Turck MMCache for some time > now using shmem for the internal bytecode. > http://www.apachefriends.org/en/xampp.html Cool, thanks. Dan |