Welcome Guest, Not a member yet? Register   Sign In
Storing shared variable on the server
#1

[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.
#2

[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.




Theme © iAndrew 2016 - Forum software by © MyBB