namespace Umbraco.Cms.Core.Cache;
///
/// Represents a dictionary of for types.
///
///
///
/// Isolated caches are used by e.g. repositories, to ensure that each cached entity
/// type has its own cache, so that lookups are fast and the repository does not need to
/// search through all keys on a global scale.
///
///
public class IsolatedCaches : AppPolicedCacheDictionary
{
///
/// Initializes a new instance of the class.
///
///
public IsolatedCaches(Func cacheFactory)
: base(cacheFactory)
{
}
///
/// Gets a cache.
///
public IAppPolicyCache GetOrCreate()
=> GetOrCreate(typeof(T));
///
/// Tries to get a cache.
///
public Attempt Get()
=> Get(typeof(T));
///
/// Clears a cache.
///
public void ClearCache()
=> ClearCache(typeof(T));
}