asp.net mvc - MVC 3 - Sessionless controllers datastore options -
i've been reading sessionless controllers lately , seems interesting idea, since improves perfomance , let ajax calls asynchronous, should be.
however, can't figure nice way store data stored session. have lot of single-fetch data once , walks through several pages. first thought use memorycache, reading post begin doubt it, since iis can let go data anytime.
because of this, got little confused on should store data in session way. read couple of thing nosql , mongodb, wouldn't same fetch data time need it?
can give me clarifications , technologies can use serve temporary datastore?
have considered using httpcontext.cache? you're saying in session way, there no reason couldn't create cache key based upon sessionid of current request:
// cache key var cachekey = string.format("{0}-{1}", "somekey", session.sessionid); // save cache httpcontext.cache.insert(cachekey, <yourobject>, null, cache.noabsoluteexpiration, timespan.fromminutes(20)); from there matter of passing along sessionid , retrieving @ later time:
httpcontext.cache[cachekey]
Comments
Post a Comment