是否可以通过在asp.net mvc4中使用缓存来维护单个用户信息? [英] Is it possible to maintain individual user information by using cache in asp.net mvc4?

查看:75
本文介绍了是否可以通过在asp.net mvc4中使用缓存来维护单个用户信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过在asp.net mvc4中使用缓存来维护单个用户信息?

Is it possible to maintain individual user information by using cache in asp.net mvc4?

推荐答案

是的,你可以使用缓存,但它不能正常工作因为缓存是在应用程序级别。如果要存储用户信息,则需要使用Session而不是缓存。
Yes, you can use cache but it won't work well because cache is at the application level. If you want to store user information you'll want to use the Session instead of the cache.


这篇关于是否可以通过在asp.net mvc4中使用缓存来维护单个用户信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆