Thursday, August 18, 2011

Joel Holder wrote SessionObjectCache which wraps Session

Put object bar into a Session named as variable foo defines:

SessionObjectCache.Add(foo, bar);

 
 

Conditionally retrieve from a Session named as variable foo defines a Bar object:

if (SessionObjectCache.Get(foo) != null) bar = SessionObjectCache.Get<Bar>(foo);

No comments:

Post a Comment