1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| using System;
| using System.Collections.Concurrent;
|
| namespace IStation
| {
| /// <summary>
| ///
| /// </summary>
| internal sealed partial class SharedMemoryCache
| {
| /// <summary>
| /// 私有构造函数
| /// </summary>
| private SharedMemoryCache()
| {
| _memoryCache = new System.Runtime.Caching.MemoryCache(Guid.NewGuid().ToString());
| _cacheKeysBeingHandled = new ConcurrentDictionary<string, CacheKeyBeingHandled>();
| }
|
| /// <summary>
| /// 获取缓存实例
| /// </summary>
| public static SharedMemoryCache Instance => _lazy.Value;
|
| }
| }
|
|