Re: Global storage of objects.

From: Date: Fri, 30 Nov 2001 07:38:08 +0000
Subject: Re: Global storage of objects.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-76149@lists.php.net to get a copy of this message
Your suggestion is as far as I got on my own... ;-=) What I want is to keep the object in memory, and not have to read data from disk the next time I need the object. I cant use cookies, since the object should be avaliable to more than one user. (Global, as I said in my first post.) The object can be pretty large, too. Since I come from the Java/JSP-world, what I am trying to find is something that corresponds to : "pageContext.setAttribute(key, object, PageContext.APPLICATION_SCOPE);" This will store "object" under the name "key", being avaliable from anywhere in the JSP-environment. Poor man's cache, that is. /Stefan Jani Mikkonen wrote: > > > I would like to know if there is a way to store objects globally from a > > php-page, so that the object can be used from another page. > > Keyword is Serialization. If you save object to flatfile or to db, i dont > see any point why the result wouldnt be accessible from other places > (providing that those other places do have access to same datesource) > > More info can be found @ > > http://www.php.net/manual/en/language.oop.serialization.php

« previous php.general (#76149) next »