gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 21:29:31 27 4
gpt4 key购买 nike

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 anamed region in memory. The built-in memory cache object does notsupport the concept of regions but it is used in this blog todemonstrate how you would implement regions in a custom cache class.A cache region is a partition in memory that is reserved for storingone or more cache objects. A cache region helps organize cache objectsin memory.

(我的重点)

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

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com