RE: [PHP-DEV] Instantiation of class objects

From: Date: Fri, 22 Dec 2000 18:34:34 +0000
Subject: RE: [PHP-DEV] Instantiation of class objects
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-42127@lists.php.net to get a copy of this message
I am well aware of what *MIGHT* happen by doing this. The reason I would want to store this, is I have a set number of objects that every page needs. These do not change regularly and it is part of an intranet site with limited concurrent connections. Having the objects essentially cached in my sessions would save the overhead of having to re-query the database and some other tasks these objects do upon initialization. The code being changed is not a problem in my situation as I am the only one who maintains it and the web server. I'll check the archives also, I'd like to see where this debate went. Chris -----Original Message----- From: php4@developersdesk.com [mailto:php4@developersdesk.com] Sent: Friday, December 22, 2000 12:32 PM To: Chris Newbill; PHP-DEV Subject: RE: [PHP-DEV] Instantiation of class objects Addressed to: "Chris Newbill" <cnewbill@onewest.net> "PHP-DEV" <php-dev@lists.php.net> ** Reply to note from "Chris Newbill" <cnewbill@onewest.net> Fri, 22 Dec 2000 08:58:25 -0700 > > Probably the best way to do it though would be allowing objects to be > serialized...with their methods =)...so then I can just save them in > my current session and recall them the next time around. > > I for one would love to have this! Why would you want to store a separate copy of the code for each session, when all you have to do is include() or require() it into each program where it is used? (_Before_ you start the session.) If you do store a separate copy with each of the thousands of sessions you might have hanging around on your system, what happens when you update the code? All of those old sessions will still have the old code in them, ready to screw things up. This is NOT a good idea. It has been well covered on this list in the past, you might want to check the archives. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#42127) next »