Welcome Guest, Not a member yet? Register   Sign In
CI Session Library
#1

[eluser]danmontgomery[/eluser]
I've posted a replacement for the CI session library which utilizes drivers... I refactored the cookie and database sessions (eliminating the 'sess_use_database' config option), and added native sessions and cache sessions.

Cache sessions have been tested with all of the drivers that come with CI (file system, apc and memcached), but should work with any other cache driver (redis?).

All session functions are still used the same way (set_userdata(), etc). The only major change I've made at this point is that sess_write() is only called once, in __destruct(). This has a couple of negative side effects that I've discovered today, namely that if you are using DB sessions, the write query won't be in the profiler, as it happens after the profiler is finished. Also, if an exception occurs in sess_write(), that won't show up either... Looking at alternatives.

You can get the spark at http://getsparks.org/packages/session-dr.../HEAD/show
#2

[eluser]broadband[/eluser]
@danmontgomery

I tried your library but adds 100ms overhead. I'm using database.




Theme © iAndrew 2016 - Forum software by © MyBB