Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
caching/state management
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Karl Seguin [MVP], post: 510377"] They are both viable solutions, they both have advantages. Session specific keys can be ugly and messy. I wish that there was a SessionCache that took the wonderfulness of the cache object, and made it session-based. On the flip side, sessions pin stuff in memory. I much prefer the cache approach, where you aren't guaranteed it'll be there. By using weak references, the Cache allows ASP.NET to manage it's own memory much better than the session object does. You have to code more defensively (check if it's in the cache first, since it might not be), but in the end it's much more powerful code. Also, remember, Sessions scale better because you can go out of process if you need to, cache object is always going to be per-machine. Use the session object if you think you might need to go out of process. Without knowing more details, I'd probably go the way of the cache. You could built a wrapper than abstacts the implemnentation, thus letting you switch between the two easily. Karl [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
caching/state management
Top