[Solar-talk] Adapter-aware session package

Antti Holvikari anttih at gmail.com
Sat Nov 17 07:46:56 CST 2007


On Nov 17, 2007 2:44 PM, Antti Holvikari <anttih at gmail.com> wrote:
> On Nov 11, 2007 7:18 PM, Richard Thomas <lists at cyberlot.net> wrote:
> > Hashing can work with either memcache or DB, in the end its all just a
> > set of data after its pulled out of the proper layer.
>
> I wrote an SQL session adapter which only writes data when it has been
> changed [1].
>
> With it you can for example use Sqlite for storing the session data.
> Just set these config keys in your config file:
>
> $config['Solar_Session']['adapter'] = 'Solar_Session_Adapter_Sql';
> $config['Solar_Session_Adapter_Sql']['sql']['name'] = '/path/to/db.sq3';

Ooops. Forgot to mention that you also need to tell the SQL adapter
that it should use Sqlite (or whatever sql adapter you want to use).
So here's the new set of configs needed:

    $config['Solar_Session']['adapter'] = 'Solar_Session_Adapter_Sql';
    $config['Solar_Session_Adapter_Sql']['sql']['adapter'] =
'Solar_Sql_Adapter_Sqlite';
    $config['Solar_Session_Adapter_Sql']['sql']['name'] = '/path/to/db.sq3';

-- 
Antti Holvikari


More information about the Solar-talk mailing list