c# - CacheItem regionName 属性责任/用途?

标签 c# asp.net caching .net-4.0

MSDN 文档没有详细解释它的用途。

由于它是可选的,我几乎假设它类似于某种元数据。

我现在如何看待它,我想用它来为特定用户指定缓存,例如:

new CacheItem(key: "keyName", value: objectData, regionName: "userName")

CacheItem 类的 regionName 属性的职责是什么?它有什么用?

最佳答案

来自 Caching Application Data by Using Multiple Cache Objects in an ASP.NET Application ( archive )

The custom class demonstrates how you would store the cached data in a named region in memory. The built-in memory cache object does not support the concept of regions but it is used in this blog to demonstrate how you would implement regions in a custom cache class. A cache region is a partition in memory that is reserved for storing one or more cache objects. A cache region helps organize cache objects in memory.

(我的重点)

关于c# - CacheItem regionName 属性责任/用途?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8825783/

相关文章:

c# - 线程同步 XNA 网络

c# - 我什么时候应该使用 ServiceFabricIntegrationOptions.UseUniqueServiceUrl

Azure(或任何云托管)上的 ASP.NET Web 表单应用程序

ios - HTTP GET 请求的缓存不适用于 iOS 6

c++ - 在缓存 C++ 中查找命中/未命中

C# listview 可点击的列和行

c# - 防止 Excel 退出

c# - 转换.日期时间

javascript - 在同一行的复选框选中/未选中时启用 GridViewRow 中的 DropDownList(使用任何 c#、jquery、javascript)

android - 位图缓存如何工作?