佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1028|回复: 2

需要高手们的意见

[复制链接]
发表于 24-10-2008 03:40 PM | 显示全部楼层 |阅读模式
有谁用过Caching的吗?

在一个 Smart Client Application 里面,有些储存在 Database 的 Data (Eg, Language List) 会时常被用到。


Retrieve Data 的方法是通过 Web Service (因为一些原因,这些 Data 是不可以放在 Local Cache/Memory 里面的),所以决定是放在 Server Cache 里面 (To increase performance, because is really very frequently access)。


那么要怎么 Maintain 在 Server Cache 里面的 Data Consistency 呢?如果 User A, 要 Retrieve "Language List",  User B,要 Update "Language List", 那么 User B update Language List 的同时, Cache 里面的 Language List 要被 Refresh (Reload). 所以, User A 不是 Retrieve 不到 Language List 了么?

有什么建议么?
回复

使用道具 举报


ADVERTISEMENT

发表于 26-10-2008 11:39 PM | 显示全部楼层
Actually most database server does implement their own caching mechanism, what u need to do is to configure it to u own need. Unless u are really "good", u can write u own caching mechanism. E.g. Database server normally have the connection pooling feature, if the connection string is same for each connection, the database server is
smart enough to know how to cache and retrieve the connection resource (making a connection is very resource consuming if does not implement connection pooling mechanism).  Happy programming..
回复

使用道具 举报

 楼主| 发表于 28-10-2008 06:26 PM | 显示全部楼层
But why not we using Microsoft.Practices.EnterpriceLibrary.Caching Object to perform the caching at memory State? Does it make sense that this method is faster than retrieving the cache from the Database Cache?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 23-12-2025 04:52 AM , Processed in 0.105923 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表