BillyT Posted March 4, 2009 Share Posted March 4, 2009 Hi there I posted this on another thread but thought it deserved its own. I have a php script that multiple users access that has something like session_start(); include('../common.php'); echo $someVar; in common.php it accesses the session vars and and sets values for other vars eg $num=$_SESSION['num']; $someVar = $num+5; Is it possible for 2 users to hit the script in quick succession and for the server to return cached values to the second user, and thereby pass this second user the values from the first users session? So for example, let's say in user 1, $_SESSION['num']=5; and in user 2, $_SESSION['num']=25; user 1 loads page and it displays 10. user 2 then loads page and it should display 30 but is it possible for the server to say "i've cached common.php and I already know $someVar = 10 so I'll return that to user 2". I'm guessing this can't happen but just want to make sure. Thanks in advance Quote Link to comment Share on other sites More sharing options...
phpdragon Posted March 4, 2009 Share Posted March 4, 2009 server cache only stores html output i believe so the variables in common.php would never be cached as they are pre output and would be set everytime it loads Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.