Welcome Guest, Not a member yet? Register   Sign In
Locking a config variable
#1

Hi all,

I'm saving an array in $config array like this one below:
Code:
$config['listed'] = array(86, 52, 265, 7, 580);

And this array get updated from database when a certain event is fired by privileged users. Now my question is that what if a script gets updated values from database & updates the config item and another script tries to read the same config item meanwhile. Should I worry about this and how should I handle the executions?

I know about file locking but never used that and not sure how to apply for a variable (config item).
Reply


Messages In This Thread
Locking a config variable - by amit - 06-19-2015, 06:00 AM
RE: Locking a config variable - by gadelat - 06-19-2015, 09:43 AM
RE: Locking a config variable - by amit - 06-19-2015, 11:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB