tangxu
2024-04-30 26d8996e55c33186800031f7c305688035bb3182
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
namespace IStation.ChEr
{
    internal sealed partial class SharedMemoryCache
    {
        /// <summary>
        /// See if the cache contains a specific cache key
        /// </summary>
        /// <param name="key">the cache key to look for</param>
        /// <returns>true if the supplied cache key was found</returns>
        public bool HasKey(string key)
        {
            if (key == null)
                return default;
            return _memoryCache.TryGetValue(key, out _);
        }
    }
}