[nycphp-talk] Using shared data at the server level
nyphp at NewAgeWeb.com
Fri Mar 14 13:54:05 EST 2003
What about semaphore/shared memory functions?
Are they expensive to use?
42.7% of all statistics are made up on the spot.
From: David Sklar <sklar at sklar.com>
To: NYPHP Talk <talk at nyphp.org>
Date: Friday, March 14, 2003 11:16 AM
Subject: RE: [nycphp-talk] Using shared data at the server level
>PEAR Cache has support for an msession container. That might do the trick.
>On Friday, March 14, 2003 11:05 AM, Ophir Prusak wrote:
>> Hi All,
>> I'm looking for the best way to store non-critical frequently updated
>> data that needs to be shared across all php processes (on a single
>> server). Please notice I say frequently updated. If I'm just storing
>> something that only changes once every N requests (where N is a large
>> number) then I'd just use the file system since the OS caches that
>> For example, lets say I wanted to have a page counter on every page.
>> Ideally, I'd just have a variable which is read/write by any php
>> process on the server. Something like this:
>> $my_super_global ++;
>> print "this is page view $my_super_global";
>> One way is to use the file system.
>> This or course is pretty simple, but since the file needs to be
>> updated every single request, I'm thinking it would be faster to use
>> Has anyone done anything like this ?
>> Does anyone know of any existing or built in packages can I use ?
>--- Unsubscribe at http://nyphp.org/list/ ---
More information about the talk