> -----Original Message----- > From: PHP general > Sent: Friday, January 23, 2004 1:43 PM > To: [EMAIL PROTECTED] > Subject: [PHP] what PHP really needs > > > I've heard there's a feature like this in Cold Fusion, which every > Cold Fusion user seems to think of as the holy grail, and I would > have to agree with them.
[Marlon Moyer] ColdFusion allows you to store variables in several different scopes including Session, Application, and Server. You already know session variables. Application variables only exist within a specified application and can have a timeout specified. Server variables can be accessed by all applications on that server. > > One thing I've heard they use this for is to load an entire database > into system memory. I don't know exactly how it's works but imagine > having the whole database in system memory. When you change data you > update it both in system memory and on the drive, but when you select > (which is what you mostly do), you just query the mirror in system > memory. > [Marlon Moyer] I've never seen anyone load an entire database into the application scope but it is common practice to load small queries that deal with the application into the application scope. For example, I have a calendar that allows you to choose only certain dates. These dates are in a table and can be modified 1 or 2 times a week. Instead of the application hitting the database everytime, I store the query in an application variable. > > The only drawback I can see is that there might be multi threading > issues, so if this would be implemented a new key word would probably > have to be introduced to make data mutexed, or perhaps the other way > around to avoid to many people scratching their heads. > [Marlon Moyer] You do have to account for race conditions, but I'd gladly deal with those and still have the convenience of application variables. > /Sebastian Karlsson > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php