使用缓存存储数据(由多个应用程序共享)的最佳示例. [英] Best example for using Caching for storing data ,shared by multiple applications.

查看:92
本文介绍了使用缓存存储数据(由多个应用程序共享)的最佳示例.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,
我必须为多个应用程序存储一些配置数据.任何人都可以建议我做同样的事情.

目前,我使用的是文件系统,我正在从DB获取数据并创建xml文件,现在所有应用程序都在从xml文件共享数据.但是在这种情况下,如果我的配置数据发生更改,那么如何刷新数据.

我已经阅读了有关sql依赖项的信息,但是如果一定时间后必须影响某些数据,它会在场景管理中失败.
即我的配置数据具有一些值,例如收费,应在用户给定时间后影响每个应用程序.

如果可能,请发送一些示例示例.

谢谢
阿伦·克尔(Arun Kr.)夏尔马
诺伊达队
Nexgen.


I have to store some configuration data for my multiple applications.Can anyone suggest me the best for doing the same.

Currently i have impimented file system in which i am getting data from DB and creating a xml file and now all applications are sharing data from the xml file. But in this case if my configuration data changes then how to refresh the data.

I have read about sql dependency but its failed in the scenerio if some data has to be affect after a given time .
i.e my configuration data has some values like charges that should be affect each application after the given time by the user.

Please send some sample example if posible.

Thanks
Arun Kr. Sharma
Noida team
Nexgen.

推荐答案

您可以使用SqlCacheDependency类在数据库的表或行上创建缓存项依赖项.当表或特定行中发生更改时,具有依赖项的项目将无效并从缓存中删除.
You can use the SqlCacheDependency class to create a cache item dependency on a table or row in a database. When a change occurs in the table or in a specific row, the item that has a dependency is invalidated and removed from the cache.


您可以使用Caching Application Block http://msdn.microsoft.com/en-us/library/ff648951.aspx> [
You can use Caching Application Block of [Enterprise Library]


这篇关于使用缓存存储数据(由多个应用程序共享)的最佳示例.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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