php globaly persistant variables for IPC status calls in ajax for synchronous processing - SHM? APC? |
[eluser]phazei[/eluser]
That's why I wanted to use shared memory, doing database calls or writing updates to the file is very resource intensive. I had found an IPC class suite that emulates shared memory with either files or dbs. It does have a class that uses shmop but I didn't like that since it doesn't store anything but strings. APC lets me write to memory creating global persistent variables. I just need to make sure the key is unique so multiple users don't interfere with eachother. Code: $key = MYhash($username, $salt); So simple. $data can be any variable. But I want to write it into a class so I can go: Code: $this->apc->put($key) = $data; But I don't know how to do that because both $key and $data need to be fed to the function as parameters. AFAIK I can't assign a function a variable... Anyone have an idea? I don't think I can overload the assignment operator in php... |
Messages In This Thread |
php globaly persistant variables for IPC status calls in ajax for synchronous processing - SHM? APC? - by El Forum - 02-06-2009, 12:41 AM
php globaly persistant variables for IPC status calls in ajax for synchronous processing - SHM? APC? - by El Forum - 02-06-2009, 03:26 AM
php globaly persistant variables for IPC status calls in ajax for synchronous processing - SHM? APC? - by El Forum - 02-07-2009, 08:51 PM
php globaly persistant variables for IPC status calls in ajax for synchronous processing - SHM? APC? - by El Forum - 02-08-2009, 04:00 PM
php globaly persistant variables for IPC status calls in ajax for synchronous processing - SHM? APC? - by El Forum - 02-08-2009, 05:27 PM
|