|
查看: 1025|回复: 2
|
需要高手们的意见
[复制链接]
|
|
|
有谁用过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 了么?
有什么建议么? |
|
|
|
|
|
|
|
|
|
|
发表于 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? |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|