July 31, 2013
3:24 p.m.
Hi, just an idea which came to my mind What if we use Smalltalk session object as session cache? So, in addition to serving as an unique session object (to identify that session has changed), we can easily turn it into cache, by making this object an instance of WeakIdentityKeyDictionary, then one can write: mySessionResource ^ Smalltalk session at: self ifAbsentPut: [ self initializeForNewSession ] the nice property of it, that all cache automatically vanishes on each new session, and you don't have to worry about writing extra code (like shutdown/startup methods) to manage that. -- Best regards, Igor Stasenko.
4748
Age (days ago)
4748
Last active (days ago)
0 comments
1 participants
participants (1)
-
Igor Stasenko