i need invalidate (expire)some data array memcached array when user php session expire , both @ same time . use memcached php session . why don't store array inside $_session ? because datas keep/send in http header in ajax , , thats not case external memcached array . possible set memcached expire key when php session expire ?
you can implement custom session handler session_destroy.
when session destroyed, php call destroy handler session id.
php call gc callback time time expire session records according set max lifetime of session. routine should delete records persistent storage last accessed longer $lifetime.
in custom handler can clear expired user data memcached.
Comments
Post a Comment