From: Charles C. <ch...@ru...> - 2005-05-03 14:43:58
|
Dan, My understanding is that, to avoid potential memory (and other resource) leaks taking down the webserver, there has been a conscious design decision to implement php as not keeping any memory context between http requests. I understand that there are ways around this but they are not straightforward. Regards, Charles > -----Original Message----- > From: Dan Frankowski [mailto:dfr...@cs...] > Sent: 03 May 2005 22:08 > To: 'php...@li...' > Subject: [Phpwiki-talk] PHP persistent caching > > Folks, > > 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? > > Dan |