Cleaning up (selectively) on logout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cleaning up (selectively) on logout

sebastianconcept@gmail.co
Hi there,

let's say you want to keep your worker images in shape and make seaside to forget everything related to a session that has just logged out (or manually or programmatically expired).

How you guys do that?

Any way to purge selectively the stuff that's cached in the image?


o/






_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Cleaning up (selectively) on logout

Philippe Marschall
On Tue, Nov 13, 2012 at 7:22 PM, Sebastian Sastre
<[hidden email]> wrote:
> Hi there,
>
> let's say you want to keep your worker images in shape and make seaside to
> forget everything related to a session that has just logged out (or manually
> or programmatically expired).
>
> How you guys do that?
>
> Any way to purge selectively the stuff that's cached in the image?

What do you need in addition to removing the session from the session
cache in the application?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Cleaning up (selectively) on logout

sebastianconcept@gmail.co

Any way to purge selectively the stuff that's cached in the image?

What do you need in addition to removing the session from the session
cache in the application?


yes, the session gets removed from the cache on #unregister: but what about all the callbacks related to that session?

after session has been unregistered, would those stay in the cache for a while? how long/short? in case they stay, is there any way to purge those immediately on unregister?



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Cleaning up (selectively) on logout

Philippe Marschall
On Thu, Nov 15, 2012 at 2:47 AM, Sebastian Sastre
<[hidden email]> wrote:

>
> Any way to purge selectively the stuff that's cached in the image?
>
>
> What do you need in addition to removing the session from the session
> cache in the application?
>
>
> yes, the session gets removed from the cache on #unregister: but what about
> all the callbacks related to that session?
>
> after session has been unregistered, would those stay in the cache for a
> while? how long/short? in case they stay, is there any way to purge those
> immediately on unregister?

I haven't checked this with the code, so take it with a grain of salt.

The callbacks should be registered in the continuation which should be
registered in the session. So unregistering a session should make them
all eligible for garbage collection. The callbacks should implicitly
become invalid once the session is unregistered because the lookup
first looks up the session. If the session can't be found you
shouldn't be able find and therefore execute the callbacks.

TL;DR everything should just work but you might want to check in the
code yourself ;-)

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Cleaning up (selectively) on logout

sebastianconcept@gmail.co
yeah, the question was not about security

thanks anyway


On Nov 15, 2012, at 11:07 AM, Philippe Marschall wrote:

On Thu, Nov 15, 2012 at 2:47 AM, Sebastian Sastre
<[hidden email]> wrote:

Any way to purge selectively the stuff that's cached in the image?


What do you need in addition to removing the session from the session
cache in the application?


yes, the session gets removed from the cache on #unregister: but what about
all the callbacks related to that session?

after session has been unregistered, would those stay in the cache for a
while? how long/short? in case they stay, is there any way to purge those
immediately on unregister?

I haven't checked this with the code, so take it with a grain of salt.

The callbacks should be registered in the continuation which should be
registered in the session. So unregistering a session should make them
all eligible for garbage collection. The callbacks should implicitly
become invalid once the session is unregistered because the lookup
first looks up the session. If the session can't be found you
shouldn't be able find and therefore execute the callbacks.

TL;DR everything should just work but you might want to check in the
code yourself ;-)

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside