Session cache, lock and write

From: Date: Thu, 14 Nov 2013 19:42:47 +0000
Subject: Session cache, lock and write
Groups: php.internals 
Request: Send a blank email to internals+get-70121@lists.php.net to get a copy of this message
Hi all, Session module can be faster in several ways. It can ignore writing session data when session data is not changed. It also can remove reading session data by caching as most web servers support keep alive. Current session save handlers lock session data, but it could be unlocked. There are many applications that transnational consistency of session data is not mandatory. Session module could have ini settings - session.read_cache = int (by default 0 = no cache. 5 for 5 seconds) Read cache will be updated if session data has changed. - session.lock = On/Off (On by default. Some save handlers already have this) - session.write_short_circuit = On/Off (Off by default) Users may verify save handler feature by viewing phpinfo() and source code level compatibility will be kept. These features boost web application performance a lot by ignoring session data consistency. It's just like transnational vs. non-transnational SQL. session.read_cache and session.lock may be consolidated since enabling session.read_cache disables session.lock. There are slight difference between them but it may be ignored. (With session.lock=On, writes from other web server(PHP) can be blocked even when session.read_cache=5, but reading session cache on the same keep alive session will not be blocked, for example.) Any comments? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#70121) next »