using System.Collections;
using System.Collections.Concurrent;
using System.Text.RegularExpressions;
using Umbraco.Extensions;
namespace Umbraco.Cms.Core.Cache;
///
/// Implements on top of a concurrent dictionary.
///
public class DictionaryAppCache : IRequestCache
{
///
/// Gets the internal items dictionary, for tests only!
///
private readonly ConcurrentDictionary _items = new();
public int Count => _items.Count;
///
public bool IsAvailable => true;
///
public virtual object? Get(string key) => _items.TryGetValue(key, out var value) ? value : null;
///
public virtual object? Get(string key, Func