[Catalyst] Unnecessary session writes

Bill Moseley moseley at hank.org
Wed Dec 17 13:11:17 GMT 2008

On Wed, Dec 17, 2008 at 08:34:36AM +0000, Tomas Doran wrote:
> On 17 Dec 2008, at 05:11, Bill Moseley wrote:
>> On Tue, Dec 16, 2008 at 06:20:43PM +0000, Tomas Doran wrote:
>>> Do you fancy writing a test for the issue so we can actually prove  
>>> it is
>>> gone?
>> Well, it would could be something like this:
> <snip>
> Again looks perfectly reasonable to me :)
> Apologies if I wasn't being clear perviously - could you convert your  
> suggested changes and test into a diff against the distribution which  
> someone could just apply with patch, rather than having to fiddle around 
> copying chunks of code out of email?

Sure, but not until we can figure out what changes really need to be

>> But, the plugin also always writes an "expires:" key into the store
>> (hence the /^session:/ match above), so if the goal is to not write to
>> the store unless there's something to store then that needs looking
>> at, too.
> Agreed.

But, if you have an application that is mostly read-only on the
session then there's the potential of timing out an active session if
it's not refreshed.  Depends on the application.  If using the
application naturally writes to the session often then it's not such
a problem.

And for stores that manage expiry we don't really want that extra
store call in addition to session store.

> If you'd like to include TODO tests for that in the patch (or just fix 
> it, with no TODO in the test), then that would be fantastic.
> As you've probably seen from the mailing list already, there are a  
> couple of pending patches on Catalyst-Plugin-Session already:
> http://dev.catalyst.perl.org/repos/Catalyst/branches/Catalyst-Plugin- 
> Session/

I have not paid that much attention.  What's the plan for those branches?

> It's easier to merge patches than chunks of changed code, but I think  
> it's pretty open-season on getting niggles fixed in the Session plugin at 
> the moment.  :)

I understand.

Bill Moseley
moseley at hank.org
Sent from my iMutt

More information about the Catalyst mailing list