数据从内存到HDD或SQL Server [英] Data from memory onto HDD or SQL server

查看:121
本文介绍了数据从内存到HDD或SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个Web服务,该服务使用Context.Cache将字符串的命名列表放到内存中.如果出现问题,例如张贴者或读者断开了某些操作的方式,我想选择保存我的字符串列表.因此,我想知道是否有一种方法可以将来自缓存的消息直接放入HDD.

如果不是,最好从内存中获取消息并将其放入Web服务的实例中,然后放入HDD或SQL Server中?

哪个最适合速度?如有疑问,请在评论中注明.谢谢您的帮助!

Hi
I have a web service that puts named list of strings on to memory by using Context.Cache. I want to have the choice to save my list of strings if something goes wrong, like if the poster or the reader disconnects some how. So I am wondering if there is a way to put messages from cache and directly put into the HDD.

If not, would it be better to grab the messages from the memory and put it into the instance of the web service, then onto the HDD or a SQL server?

Which would be best for speed? Please if you have questions, put it in the comments. Thank you for the help!

推荐答案

我不明白HDD的意思,是否意味着将字符串存储在硬盘中的文本文件中?如果是的话,SQL Server将是使用文本文件的更优越,更高效和可扩展的选择.您可以编写自己的自定义Cache类,将其内容存储在SQL Server数据库中.
I do not understand what you mean by HDD, does it mean storing the strings in a text file in the hard disk? If yes, SQL Server would be a far more superior, efficient and scalable option that using text files. You can write your own custom Cache class that stores its content in an SQL Server database.


这篇关于数据从内存到HDD或SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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