CacheItem regionName responsibility / use of property?

The MSDN documentation does not provide a detailed explanation of what it is used for.

Since it is optional, I almost assume it to be some kind of metadata ...

As I look at this right now, I would like to use it as a way to specify caches only for specific users, for example:

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

What is the responsibility of the regionName property of the CacheItem class? What is it used for?

+6
source share
1 answer

From Caching application data using multiple cache objects in an ASP.NET application

A custom class demonstrates how you will store cached data in the named area 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 to implement regions in a custom cache class. A cache area is a section in memory that is reserved for storing one or more cache objects. The cache area helps organize cache objects in memory.

(my emphasis)

+7
source

Source: https://habr.com/ru/post/905753/


All Articles