![]() |
Storing shared variable on the server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Storing shared variable on the server (/showthread.php?tid=15455) |
Storing shared variable on the server - El Forum - 02-05-2009 [eluser]bikuta[/eluser] Hey there, What would be the best method to store a whole bunch of shared variables on the server? the reason for this is that I need to have them in memory for quick access, because they will be getting accessed at least once every second. At the moment my solution stores the variables in a temporary file, which is not so great because disk access can slow down when you've got hundreds of clients. Any input would be appreciated. Storing shared variable on the server - El Forum - 02-05-2009 [eluser]cwt137[/eluser] Two things come to mind. APC - http://us.php.net/manual/en/book.apc.php Memcached - http://us.php.net/manual/en/book.memcached.php APC is nice because you can even compile your PHP code. It also provides you a way to check the progress of file uploads (which uses the shared variable thing). Memecached is more work because you have to setup a Memcached server. But, then you can share data between servers too. |