需要缓存完整的数据库表,以便在用户需要时从缓存中检索数据 [英] Need to cache complete database table so data can be retrieved from cache when user needed

查看:119
本文介绍了需要缓存完整的数据库表,以便在用户需要时从缓存中检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。



我想开发一个显示学生成绩的应用程序。结果是编译后没有包含任何更改。



我听说过ASP.NET中的缓存。一旦应用程序上线,几乎1个Lac用户同时期望。所以我希望每次都不要调用数据库,数据应该来自缓存。



请提供一些好主意(最好带样本或链接)来管理根据需要申请。



谢谢。

Hello.

I want to develop an application for displaying Result of Students. The result is once compiled than do not incorporate any change in it.

I have heard about the Caching in ASP.NET. Almost 1 Lac users expected on the same time once application goes live. So i want that each time instead of calling the database the data should come from cache.

Please provide me some good ideas (preferable with sample or links) to manage the application according to needs.

Thank you.

推荐答案

当你的应用程序初始化时,让它打开一个连接并将数据读入 Recordset ,然后关闭连接。如果 Recordset 保存在应用程序全局变量中(在 global.asax 中定义,则它具有应用程序生命周期,并且有效缓存。
When your application initializes, have it open a connection and read the data into a Recordset, then close the connection. If the Recordset is kept in an application global variable (defined in global.asax, it has application lifetime, and is effectively cached.


这篇关于需要缓存完整的数据库表,以便在用户需要时从缓存中检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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