Sharing hashes between processes
| From: | Wez Furlong | Date: | Thu, 12 Jul 2001 18:33:19 +0000 |
| Subject: | Sharing hashes between processes | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-59860@lists.php.net to get a copy of this message | ||
Hey,
Suppose that I wanted to make a hash persistent so that it's contents were
shared between processes. Does the persistence mechanism keep a single copy
and protect access to it using semaphores, or is it more like the mySQL
pconnect way where a currently idle connection is used instead?
What I have in mind is a file-contents cache in order to speed up the
performance of a templating system. Can I use a (true) global hash table in
my extension and do everything via the persistent version of emalloc, or do I
have to consider something else?
I realize that there might not be a huge increase in performance, but it would
be nice to know how to do it so that if we needed that bit of extra speed, we
could get it.
--Wez.