Session and cache are, of course, volatile media. I'm not sure there is a priority that affects each other, but there are more factors than just the memory pressure that you need to consider. For example, a session will be cleared by a simple change to web.config (which processes the application pool). Of course, it is assumed that you are using the default session repository provider β you can switch to a non-working or SQL repository of sessions if this can help in your specific scenario.
source share