NYCPHP Meetup

NYPHP.org

[nycphp-talk] Using shared data at the server level

David Sklar sklar at sklar.com
Fri Mar 14 11:17:14 EST 2003


PEAR Cache has support for an msession container. That might do the trick.
--> http://pear.php.net/package-info.php?pacid=40

David

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
> anyways. 
> 
> 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
> memory. 
> 
> Has anyone done anything like this ?
> 
> Does anyone know of any existing or built in packages can I use ?
> 
> thanx
> ophir
> 




More information about the talk mailing list