When using session and namespaces, when do IO operations really occur (since sessions are stored as files somewhere on the server)?
As soon as I declare a new instance of *Zend_Session_Namespace*?
$myNamespace = new Zend_Session_Namespace('myNamespace');
As soon as I read or write into a variable of the namespace?
$myNamespace = new Zend_Session_Namespace('myNamespace');
$myNamespace->someVar = 3;
$myVar = $myNamespace->someVar;
I would like to know which operation is really expensive (IO read/write).
Zend_Session_Namespaceuses native PHP sessions.According the official PHP documentation:
As you can read, the session is written when the script shuts down.