namespace Umbraco.Cms.Core.Cache; /// /// Defines an application cache that support cache policies. /// /// /// A cache policy can be used to cache with timeouts, /// or depending on files, and with a remove callback, etc. /// public interface IAppPolicyCache : IAppCache { /// /// Gets an item identified by its key. /// /// The key of the item. /// A factory function that can create the item. /// An optional cache timeout. /// An optional value indicating whether the cache timeout is sliding (default is false). /// The item. object? Get( string key, Func factory, TimeSpan? timeout, bool isSliding = false); /// /// Inserts an item. /// /// The key of the item. /// A factory function that can create the item. /// An optional cache timeout. /// An optional value indicating whether the cache timeout is sliding (default is false). void Insert( string key, Func factory, TimeSpan? timeout = null, bool isSliding = false); }