using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
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 ConcurrentDictionary();
public int Count => _items.Count;
///
public bool IsAvailable => true;
///
public virtual object? Get(string key)
{
return _items.TryGetValue(key, out var value) ? value : null;
}
///
public virtual object? Get(string key, Func