don't write session if it's unchanged
This commit is contained in:
parent
f46084309b
commit
3727b17c39
@ -85,9 +85,18 @@ class Session extends Memcached_DataObject
|
||||
|
||||
return $session->insert();
|
||||
} else {
|
||||
if (strcmp($session->session_data, $session_data) == 0) {
|
||||
self::logdeb("Not writing session '$id'; unchanged");
|
||||
return true;
|
||||
} else {
|
||||
self::logdeb("Session '$id' data changed; updating");
|
||||
|
||||
$orig = clone($session);
|
||||
|
||||
$session->session_data = $session_data;
|
||||
|
||||
return $session->update();
|
||||
return $session->update($orig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user