Re: [Cgi-session-user] Re: Serialize::yaml,json
Brought to you by:
sherzodr
From: Tyler M. <ty...@yi...> - 2006-03-08 21:18:07
|
Mark Stosberg <ma...@su...> wrote: > > JSON and YAML serializers are in trunk as of change 249. I've logged > > into my PAUSE account and deleted the CGI::Session::Serialize::yaml > > distribution; it is scheduled to disappear on March 10th. > > > > What else needs to be done for the next release of CGI::Session to > > happen? > Thanks for this work. I'm happy to make another release with just this > improvement, if that helps some other project progress. > > However, I also want to continue the discussions about what to do about > "flush()" to see if we can agree on a short-term solution for that. > > Sherzord has weighed in, and I'd like to respond further on the issue. Sounds good. Let me know if there's anything I can do. Apache2::AUS still needs some more test/doc/examples before I can release it, but I don't want to release until I can use JSON serialization by default. I think I missed the conversation on flush(), my mailbox has been bombarded recently and I havent looked at everything. :) One comment about flush() tho: AUS's session driver uses a table format like this with additional metadata: CREATE TABLE aus_session ( id varchar(128) NOT NULL PRIMARY KEY, created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), time_last TIMESTAMP WITH TIME ZONE NULL, user_id INT NULL, a_session BYTEA NULL, FOREIGN KEY (user_id) REFERENCES aus_user (id) ON UPDATE CASCADE ON DELETE SET NULL ); In order to have the driver update user_id and time_last, I had to modify flush() to pass $session to the driver's store() method. In order to change that one line of functionality I had to copy-and-paste the entire 50-line flush method. I'd like to see flush() broken down into smaller bits; maybe instead of having it call the driver and serializer itself, CGI::Session could have it's own freeze/store/delete methods? By default they'd just call the driver/serializer methods, but then subclassing becomes easier. Just a thought... Cheers, Tyler |