CDBHttpSession locking


is there any possiblility to add locking to CDBHttpSession?

My app has several sync ajax requests that need to reed and write to the session. The main issue is - I think - the lack of locking. If I use simple CHttpSession everything is fine, but now I need a central session storage (load balanced setup).

I also tried memcached or redis to store the session data, but they seem also to lack locking.

Any ideas?

Greetings from Hamburg


You will have to extend CDbHttpSession either for transaction based or file based locking. Should be easy to implement.

For now there is no lock mechanism/component in Yii core which could be plugged in there. Also I didn’t noticed a relevant amount of people complaining about the non-locking behavior. So as far as I know, for now there are no plans to implement such a mechanism.