开发者

Tell .net runtime to scavenge for memory when too much is stored in session

开发者 https://www.devze.com 2023-02-16 02:50 出处:网络
Okay, I know you shouldn\'t keep too much in session, and it\'s more of an architectural issue than anything else (move the session state to another server, db, load balance web server), but is there

Okay, I know you shouldn't keep too much in session, and it's more of an architectural issue than anything else (move the session state to another server, db, load balance web server), but is there a way to开发者_JAVA技巧 tell .net to start scavenging for ram if there is too much being stored in session?


There is nothing built in that monitors the size of sessions, so you may have to build one yourself.

Consider using the Cache class - it has size controls that will evict older entries for newer ones and you can use a session ID as part of the cache key.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号