[Seaside-dev] expiry policies

Julian Fitzell jfitzell at gmail.com
Thu Sep 18 20:58:46 UTC 2008


On Thu, Sep 18, 2008 at 12:59 PM, Julian Fitzell <jfitzell at gmail.com> wrote:
> Thinking about this some more, though, it occurs to me that in order
> to implement expiry policies like "no more than 100 sessions" the
> expiry policy needs to be external to the handler that is being
> expired. I'm not quite sure what the design for that would look like
> though, nor whether we need to support such things.
>
> The code for WARegistry is a bit ugly at the moment. Maybe a good
> design would be to clean it up, provide pluggable expiry policies
> there, and make it therefore capable of storing *any* kind of request
> handler?

Ok, I took a crack at this. Comments (and then serious code review, if
people like it) please...

Name: Seaside-Core-jf.cache.1
Author: jf
Time: 18 September 2008, 10:54:32 pm
UUID: 6b5fe063-1407-3c48-a5ba-281fa968f4c2
Ancestors: Seaside-Core-jf.241

Another attempt at improving expiry, this time through an external
WACache. The cache is pluggable for expiry policy, aciton to take on
expiry, strategy to use incase of cache miss (might allow pulling
sessions in from disk), and cache reaping strategy (when to run a
reap).

This commit implements just enough to replace WALRUCache and the
current caching functionality on WARegistry. It removes
WAExpiringHandler as WASession can now inherit directly from
WARequestHandler (and therefore implement #responseForContext: instead
of #incomingRequest:)

I'm not certain the mutex code is totally correct at this point.

Also, there are at least the following issues:

+ WACache/WARegistry copying won't be right
+ WAExpiryFunctionalTest will be partly broken
+ WAExpiringHandler protocol should probably be marked deprecated on
WASession (#expire, #expired, #lastAccess, #secondsSinceLastAccses,
#timeoutSeconds, #timeoutSeconds:, #isActive)
+ #sessionContinuationCacheSize config attribute doesn't do anything anymore
+ there's no way to configure these things



Name: Seaside-Session-jf.cache.1
Author: jf
Time: 18 September 2008, 10:56:12 pm
UUID: 748bf148-a8c8-8243-a82d-e16097a419c4
Ancestors: Seaside-Session-jf.13

Minor changes to WASession to bring it inline with the changes in
Seaside-Core-jf.cache.1

- Use WACache instead of WALRUCache
- implement #responseForContext: instead of #incomingRequest:


More information about the seaside-dev mailing list