Re: Generic in-memory persistence
| From: | Chris Adams | Date: | Wed, 19 Jul 2000 21:11:09 +0000 |
| Subject: | Re: Generic in-memory persistence | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7338@lists.php.net to get a copy of this message | ||
> Specifically, I want to be able to create an array of values (huge
> array) in memory and then leave it there across requests to the server.
> The array comes from an XML file. Right now I have to read it in
> every time, which is pretty quick, but concerns me because it is an
> extra step that would be unnecessary were I using FastCGI.
On Unix systems, you can use the shared memory support to get the same
effect. On a couple sites that have to run on Windows, I'm using a simple
cache system since retrieving something from a MySQL heap table and
unserializing it is *much* faster than regenerating it. In particular, the
XML I'm using has to be retrieved from a not-overly-fast server, rendering
the fact that PHP can parse it in a few milliseconds moot.
Chris